|
|
|
|
|
by jcalvinowens
127 days ago
|
|
> Yep, it's a straight up error in C to return the address of a local variable from a function Sure, that's true, but nobody is suggesting returning the address of a local variable anywhere in this thread. I'm describing putting a pointer to a local variable in a global data structure, which is safe so long as the function doing it is somehow guaranteed not to return until the pointer is removed from the global data structure. |
|