(no title)
OptionOfT | 2 days ago
Correct me if I'm wrong, but isn't this a worst-case scenario? realloc can, iirc, extend in place. Your original pointer is still invalid then, but no copy is needed then.
Unless I'm missing something?
Equally, what happens to the ordering of variables on the stack? Is this new one pushed as the last one? Or is there space kept open?
E.g.:
var tasks []task
var other_var int
kbolino|2 days ago
unknown|2 days ago
[deleted]
direwolf20|1 day ago