調ã¹ããã¨æã£ããã£ããã¯ãgolang ã§ã¯ä»¥ä¸ã®ããã« ãã¼ã«ã«å¤æ°ã®ã¢ãã¬ã¹ãæ»ãå¤ã¨ãã¦ãåé¡ãªãã¨ãããã¨ã package main import ( "fmt" ) type Animal struct { Name string Age int } func main() { animal := allocAnimal() fmt.Printf("allocate animal structure %p", animal) } func allocAnimal() *Animal { return &Animal{} } C/C++ ã§ã¯ãã¼ã«ã«å¤æ°ã®ãã¤ã³ã¿ãæ»ãå¤ã¨ããå ´åã ã¹ã¿ãã¯é åã®ãã¤ã³ã¿ã颿°å¤ã«æ¸¡ãã¦ãã¾ããããã³ã³ãã¤ã«æç¹ã§è¦åã表示ããã¾ã (ãªãã¨ã©ã¼ã«ããªã) å®è¡æã«ã¯ææªãã»ã°ã¡ã³ãã¼ã·ã§ã³ãã©ã¼ã«ãã§è½ã¡ã¾ã ãã®ãããmalloc ã n


{{#tags}}- {{label}}
{{/tags}}