[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Object Data and pointer assignments

David Fanning wrote:

> To reassign the pointer to something else (after it has been
> defined by the INIT method), you simple de-reference the pointer:
>    *self.InArray = newStruct
> You don't leak any memory because IDL is managing this
> whole process for you.

Thanks for clearing this up, David. These details didn't exactly jump out of
the manuals at me.

On a related topic, does anyone know if it is possible to leak memory without
beeing able to see any lost heap variables with the 'help,/heap' command?  I
find that in a couple IDL programs that deal with shuffling large chunks of
data back and forth in memory, IDL does not seem to free all the memory it
uses back to the system. ie. When I monitor the memory usage with the Windows
NT task manager, the amount of used memory climbs each time the IDL program is
executed, and doesn't fall all the way back down -even though there doesn't
seem to be anything in the heap. When I shut down IDL, all the memory gets

Is this something I should worry about, or is it just a consequence of running
in Windows? The memory 'loss' isn't severe, but I worry that my program is
losing track of memory somehow.