comp.lang.idl-pvwave archive
Messages from Usenet group comp.lang.idl-pvwave, compiled by Paulo Penteado

Home » Public Forums » archive » Memory Cleanup-- Messy structure
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Switch to threaded view of this topic Create a new topic Submit Reply
Memory Cleanup-- Messy structure [message #71406] Wed, 16 June 2010 10:50 Go to next message
MarioIncandenza is currently offline  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 Go to previous message
penteado is currently offline  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.
  Switch to threaded view of this topic Create a new topic Submit Reply
Previous Topic: Re: recursive FILE_SEARCH in a symbolic link ?
Next Topic: Re: Memory Cleanup-- Messy structure

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ] [ PDF ]

Current Time: Wed Oct 08 13:47:42 PDT 2025

Total time taken to generate the page: 0.00444 seconds