[Bug] Garbage collection with execute? [message #77898] |
Wed, 28 September 2011 04:30 |
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?
|
|
|