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

Home » Public Forums » archive » Problem with EXIT and garbage collection
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Return to the default flat view Create a new topic Submit Reply
Problem with EXIT and garbage collection [message #90887] Tue, 05 May 2015 14:06 Go to previous message
Michael Galloy is currently offline  Michael Galloy
Messages: 1114
Registered: April 2006
Senior Member
If I have a routine like this that uses garbage collection and does not
explicitly free its memory:

pro test
compile_opt strictarr

o = list()
; obj_destroy, o

exit, status=1
end

And, run it from the command line like below, I get a strange error:

$ idl -e test
IDL Version 8.4, Mac OS X (darwin x86_64 m64). (c) 2014, Exelis
Visual Information Solutions, Inc.

% Compiled module: TEST.
% Can't return from the main level.
% Execution halted at: $MAIN$ 8

If I uncomment the OBJ_DESTROY, I get what I want:

$ idl -e test
IDL Version 8.4, Mac OS X (darwin x86_64 m64). (c) 2014, Exelis
Visual Information Solutions, Inc.

% Compiled module: TEST.
$ echo $?
1

Mike
--
Michael Galloy
www.michaelgalloy.com
Modern IDL: A Guide to IDL Programming (http://modernidl.idldev.com)
[Message index]
 
Read Message
Read Message
Previous Topic: Re: Help extracting a single column from dat file
Next Topic: Spawn under Mac Os Yosemite

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

Current Time: Wed Oct 08 09:22:53 PDT 2025

Total time taken to generate the page: 0.00440 seconds