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

Home » Public Forums » archive » [Bug] Garbage collection with execute?
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
[Bug] Garbage collection with execute? [message #77898] Wed, 28 September 2011 04:30
SonicKenking is currently offline  SonicKenking
Messages: 51
Registered: October 2010
Member
It seems to me that the IDL 8.x automatic garbage collection does NOT
work for the variables created by the "execute" command. Consider the
following very simple procedure.

pro test_gc
ok = execute('a = hash()')
end

If I run the above procedure, it ended up with memory leaking as
follows:

IDL> test_gc
% Compiled module: TEST_GC.
IDL> help, /heap
Heap Variables:
# Pointer: 1
# Object : 1

<ObjHeapVar1> refcount=1
STRUCT = -> HASH Array[1]
<PtrHeapVar2> refcount=1
STRUCT = -> IDL_HASHTABLEENTRY Array[2]

So to fix it, I have to explicitly release the variable 'a' in the
procedure, which is not optimal. Is this a known issue/bug? Both 8.0
and 8.1 have the same problem. Or did I miss something?
  Switch to threaded view of this topic Create a new topic Submit Reply
Previous Topic: Re: combine CATCH and MESSAGE
Next Topic: compile and execute from the command line

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

Current Time: Thu Oct 09 07:55:28 PDT 2025

Total time taken to generate the page: 0.72020 seconds