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

Home » Public Forums » archive » Re: Ghost object
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: Ghost object [message #21305 is a reply to message #21280] Wed, 16 August 2000 00:00 Go to previous messageGo to previous message
Martin Schultz is currently offline  Martin Schultz
Messages: 515
Registered: August 1997
Senior Member
Craig Markwardt wrote:
>
> I don't really know IDL objects from my oss, but it sounds like some
> *other* compiled IDL function or method was creating the font object.
> If by any chance you edited the source but forgot to recompile it,
> then this could have happened. When you restart the IDL session then
> it finally was recompiled anew.
>
> I do this kind of thing once in a while (edit but forget to compile),
> and it leaves me very confused. However, you say you were
> recompiling, so that doesn't seem like the right solution. Oh well.
>
> Craig
>
> Pavel Romashkin <promashkin@cmdl.noaa.gov> writes:
>> Hi,
>> I have just lost an hour and a half trying to find a heap leak in my
>> code. It is a simple object graphics, universal replacement for PLOT but
>> with zoom, edit etc. capabilities. Anyway, once I kill the plot window,
>> a cleanup routine is called that does total sweep of the heap variables
>> by looping through object fields and destroying objects and pointers.
>> Once its done, I'd call our favorite Heap_gc to see if there was a leak.
>> Sure enough, it was always finding and deleting an instance of
>> IDLGRFONT. I tried everything I could: commented out the only line where
>> IDLGRFONT was used, tried all sorts of explicit object destruction
>> immediately after creation, etc. I felt it was not my fault, so I tried
>> "Clear IDL" and .Reset, and .Full_reset. Same thing: once I recompile,
>> run and kill the object tree, IDLGRFONT would still always be found by
>> Heap_gc. It was not a fake, as its heap ID would be always higher each time.
>> Frustrated, I quit IDL and restarted. What do you think? It stopped
>> doing that. I swear the code is the same, because I went through every
>> single line checking it, saved it, tried it, got a leak and quit IDL.
>> But after restart IDLGRFONT stopped appearing in the heap.
>> I have no idea what it was, but it certainly complicated my leak search.
>> Does anybody have an explanation?
>> Thanks,
>> Pavel
>
> --
> ------------------------------------------------------------ --------------
> Craig B. Markwardt, Ph.D. EMAIL: craigmnet@cow.physics.wisc.edu
> Astrophysics, IDL, Finance, Derivatives | Remove "net" for better response
> ------------------------------------------------------------ --------------

.. but: suppose you create the font object while testing your object,
then you edit
and recompile while the object is still alive, removing the cleanup of
something
that caused the font object to appear -- well, THEN you may indeed find
a situation
where you have a memory leak. Hell, this is convoluted! If it works
after you exit and
restart, and doesn't show up again: why bother? I would only bother if
you thought
your program had finished the development stage and the error occurs
reproducibly
when running the code.

Martin


--
[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[ [[[[[[[
[[ Dr. Martin Schultz Max-Planck-Institut fuer Meteorologie [[
[[ Bundesstr. 55, 20146 Hamburg [[
[[ phone: +49 40 41173-308 [[
[[ fax: +49 40 41173-298 [[
[[ martin.schultz@dkrz.de [[
[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[ [[[[[[[
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: Rotten behavior with rot command
Next Topic: cooccurrence homogeneity: what equation?

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

Current Time: Sat Oct 11 13:00:15 PDT 2025

Total time taken to generate the page: 1.04415 seconds