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

Home » Public Forums » archive » Object Program Memory Leaking Everywhere!
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Return to the default flat view Create a new topic Submit Reply
Object Program Memory Leaking Everywhere! [message #10871] Thu, 12 February 1998 00:00
davidf is currently offline  davidf
Messages: 2866
Registered: September 1996
Senior Member
Hi Folks,

Thanks to Mark Hadfield down New Zealand way who very kindly
buttered me up by calling my web site a "taonga". (I'm not
sure either, but I'm trying to find a way to go down there
to find out.) Then he very gently lowered the boom by telling
me that my object graphic programs were leaking memory like
a sieve.

Sure enough. I was making a couple of assumptions about
cleanup routines that were just plain wrong. If you have
downloaded any of these routines, you might want to get the
latest. I think I have managed to stop up all of the leaks
now. The routines in question are:

XPLOT
XSURFACE
XIMAGE
XCONTOUR
VCOLORBAR

To see if your programs are leaking, try this. First, clean
up everything on the heap:

IDL> Heap_GC

Next, run your program:

IDL> XPLOT

Exit the program and check the heap:

IDL> Help, /Heap

If you have a bunch of objects and pointers in there, you are
leaking memory and you will want to fix it. I fixed it by
adding all of the objects I created in my program to a container
object. My program cleanup routine destroys this container,
which in turn calls the cleanup routines of all the objects
in the container. My mistake was in thinking that all of the
objects that belonged to the view were destroyed when the view
was destroyed.

Live and learn, I always say. :-)

Cheers,

David

-----------------------------------------------------------
David Fanning, Ph.D.
Fanning Software Consulting
E-Mail: davidf@dfanning.com
Phone: 970-221-0438
Coyote's Guide to IDL Programming: http://www.dfanning.com/
[Message index]
 
Read Message
Previous Topic: HELP with systime()
Next Topic: Re: Need help with vector processing.

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

Current Time: Sat Oct 11 12:16:24 PDT 2025

Total time taken to generate the page: 0.55949 seconds