It’s a question about “make”.
In c++ language, pointer variables are variables present in stacks, internally pointing to heap address, and allocate using keyword “new” or function “malloc()”. Is this the same concept?
P.S I’m so sorry to mentioning c++ repeatedly on “GO Forum”. I’m used to c++, so there’s a lot of confusion in accepting go lang. I can’t speak English well either, so c++ is the only way to explain my thoughts. I ask for your understanding.
var z int // create variable ? z = make(int,0, 5) // allocate ??? or referring to new slice object ???
char * z = nullptr; // create pointer variable, z points to nullptr z = new char; // allocate , z points to this heap address(sizeof(char) * 5)