Memory Cleanup-- Messy structure [message #71406] |
Wed, 16 June 2010 10:50  |
MarioIncandenza
Messages: 231 Registered: February 2005
|
Senior Member |
|
|
OK, here's the sequence:
IDL> STRUCT1=CREATE_STRUCT("PTR1",PTR_NEW());
IDL> STRUCTALL=REPLICATE(STRUCT1,N)
IDL> FOR I=0,N-1 DO STRUCTALL.PTR1=PTR_NEW(ALLDATA[*,I])
Then I do what I need to do, and I'm done with it, so:
IDL> UNDEFINE, STRUCTALL
Except this doesn't free the memory, according to HELP,/HEAP.
Since I'm not a real programmer, I still consider pointers to be kinda
voodoo. Can someone patiently explain how I manually clean up the
memory in this case?
Thanks,
--Edward H.
|
|
|
Re: Memory Cleanup-- Messy structure [message #71464 is a reply to message #71406] |
Thu, 17 June 2010 19:47  |
penteado
Messages: 866 Registered: February 2018
|
Senior Member Administrator |
|
|
On Jun 17, 9:10 pm, Craig Markwardt <craig.markwa...@gmail.com> wrote:
> Uh, IDL "pointers" originated in IDL 5.0, ten years ago when all the
> other scripting languages did automatic garbage collection.
I did not know they were that recent.
|
|
|