2020-02-15から1日間の記事一覧
Golang の memory allocation Golang は C/C++などと異なり、いい感じに変数のメモリ領域を割り当ててくれる。例えば、以下のようなコードでも Golang は動作する。 type Hoge struct {} func NewHoge() *Hoge { h := Hoge{} return &h } NewHoge() 内で生成…
Golang の memory allocation Golang は C/C++などと異なり、いい感じに変数のメモリ領域を割り当ててくれる。例えば、以下のようなコードでも Golang は動作する。 type Hoge struct {} func NewHoge() *Hoge { h := Hoge{} return &h } NewHoge() 内で生成…