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

Home » Public Forums » archive » Memory Leaks
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: Memory Leaks [message #16909 is a reply to message #16838] Tue, 24 August 1999 00:00 Go to previous messageGo to previous message
davidf is currently offline  davidf
Messages: 2866
Registered: September 1996
Senior Member
Tom Kluegel (kluegel@lanl.gov) writes:

> The closest thing I know is:
> IDL> HEAP_GC, /VERBOSE
>
> It might be good enough for your purposes, but it insists on actually
> deallocating the leaked heap memory, not just telling you about them.

Well, HELP, /HEAP will tell you about what you have
on the heap (but not which heap variables have
no current reference). This is often enough to figure
out where you are leaking.

HEAP_GC, of course, should only be used when your
office door is closed and no one is looking over
your shoulder. Real programmers don't need it
or use it. :-)

Cheers,

David

P.S. In practice, leakage tests work like this:

1. Type Heap_GC to clean all leaking heap variables.
2. Type Help, /Heap to see if anything is left (usually not).
3. Run your program and exit.
4. Type Help, /Heap to see if there is anything left now.

If there is, you are leaking. Usually it is just a matter of
adding the appropriate Ptr_Free or Obj_Destroy command to
the Cleanup routine.

--
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
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: Re: NT IDL Crashes
Next Topic: VIP

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

Current Time: Sat Oct 11 04:20:37 PDT 2025

Total time taken to generate the page: 0.48225 seconds