Skip to content
Prev 29463 / 63424 Next

garbage collection, "preserved" variables, and different outcome depending on "--verbose" or not

On 20/07/2008 9:01 AM, Laurent Gautier wrote:
You are working with variables without protecting them, so you just get 
lucky whenever the code works.

More below...
At this point, the variable is unprotected, i.e. you have declared that 
  its memory is free for the taking.  You should not try to do anything 
with it.  printObject calls several functions, and one of those may have 
overwritten the memory.  It's not surprising that different flags 
(--verbose or not) result in different behaviour.
Same thing here.  x_R is unprotected now, so you shouldn't use it.

Duncan Murdoch