|
![](/i/fill.gif) |
Warp wrote:
> Are you sure the compiler is not performing some clever optimization
> tricks there like: "Hmm, this code allocates a piece of memory to this
> pointer, the pointer demonstrably is not passed to anything anywhere
> but is re-assigned a new memory block, thus the allocated memory is
> likewise freed at that point, so I'll put a GC flag to this block of
> memory to tell the GC engine that it's free."
I'm not sure that's the case. I'm almost certain that it doesn't reuse
memory in the middle of the block that's already been freed.
> I wonder if it makes any difference if the pointer is passed to some
> function which the compiler doesn't know what it does at this point.
I'll give that a go and let you know. I'll try to make it more convoluted.
--
Darren New, San Diego CA, USA (PST)
"Ouch ouch ouch!"
"What's wrong? Noodles too hot?"
"No, I have Chopstick Tunnel Syndrome."
Post a reply to this message
|
![](/i/fill.gif) |