Re: Object Program Memory Leaking Everywhere! [message #10859] |
Fri, 13 February 1998 00:00 |
davidf
Messages: 2866 Registered: September 1996
|
Senior Member |
|
|
Paul C. Sorenson (paulcs@netcom.com) writes:
> davidf@dfanning.com (David Fanning) writes:
>
>> 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.
>
> But an IDLgrView is an IDL_Container (see Superclasses in "Objects &
> Object Graphics" p.250), so IMHO, your thinking should have been
> correct.
Well, upon further experimentation it appears that the things
I directly added to the model (and, hence, the view) were
destroyed in the way that I expected them to be. (I've now
gone a little overboard in my latest programs in my cleaning
zeal. A problem I suffer from in general according to my
wife and children.)
What was not destroyed was the objects I added to the
model indirectly. For example, if I add Font and Text
objects to an Axis and then directly add the Axis to the View,
the Axis is destroyed, but not the Font and Text objects.
It does seem to me it would be a little nicer to have
some "cleanup inheritance" going on here, but I can also
see the other side of the question and appreciate that in
some situations I would like to have persistence of things
like Font objects.
It is really just a question of knowing what the rules are
so I can make more intelligent decisions in my programs.
I *think* I am beginning to understand it now, but I must say
the documentation seems to leave it a little bit up in the
air.
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/
|
|
|
|