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

Home » Public Forums » archive » heap_gc behaviour
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Return to the default flat view Create a new topic Submit Reply
Re: heap_gc behaviour [message #19556 is a reply to message #19552] Tue, 04 April 2000 00:00 Go to previous message
davidf is currently offline  davidf
Messages: 2866
Registered: September 1996
Senior Member
martin rother (rother@gfz-potsdam.de) writes:

> I detected now a 'heap_gc' behaviour, which I don't *understand*,
> but I'm *not sure* if this is a bug, an annoying feature or ...
>
> A call of 'heap_gc' inside a routine destroys a
> a heap-variable given as parameter.... ?
>
> Yes, I have read the reference manual... but as long I understand
> a call of 'heap_gc' inside a function is not forbidden.
>
> I add here a small demonstration: a 'batch', a tiny function which is
> called and the IDL messages.
>
> any hints?

Humm. Well, I don't know. But since you asked for "hints", which
I read as "advice", here is one.

Heap_GC is an admission of failure.

I'm of the opinion it should only be used after
you have closed the door to your office and sent
your office mate out for a couple of Danish. Putting
it in a program is, to me, a mark of a ... well, an
*inexperienced* programmer. :-)

Much better to learn how to free pointers and
destroy objects correctly than have to resort to
Heap_GC. About the only time it can legitimately
be used is during program development and before
you have added all your CATCH error handlers.

Cheers,

David

--
David Fanning, Ph.D.
Fanning Software Consulting
Phone: 970-221-0438 E-Mail: davidf@dfanning.com
Coyote's Guide to IDL Programming: http://www.dfanning.com/
Toll-Free IDL Book Orders: 1-888-461-0155
[Message index]
 
Read Message
Read Message
Previous Topic: Speed up movie in object graphics.
Next Topic: Re: heap_gc behaviour

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

Current Time: Sun Nov 30 21:17:17 PST 2025

Total time taken to generate the page: 1.77139 seconds