|
|
|
|
|
by pitkali
1756 days ago
|
|
Even if slice is reallocated, the information about new reallocated slice is still stored in variable s. ps is merely pointing to that variable. The fact that the contents of the variable changed does not mean that its location has to change. In other words, ps is a pointer to a pointer to array data. Append may change the inner pointer's value but that's about it. |
|