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

Home » Public Forums » archive » Re: Why IDLgrContainer?
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: Why IDLgrContainer? [message #12368] Thu, 16 July 1998 00:00
davidf is currently offline  davidf
Messages: 2866
Registered: September 1996
Senior Member
Imanol Echave (ccaeccai@sc.ehu.es) writes:

> I've seen in many programs the people creates an IDLgrContainer to destroy the
> objects at the end of the program, but I've done a test and when you destroy an
> IDLgrModel the objects added to this model are destroyed too. Is really
> necessary to create an IDLgrContainer?

Actually, IDLgrContainer has disappeared without a trace in
IDL 5.1. Sorta like those South American desaparecidos.
Nobody's talking. The new guy is IDL_Container. Long live
the king.

In any case, to answer your question, the IDLgrModel appears
to be a subclass of the container class. So yes, things you
add explicitly to the model will be destroyed when the model
is destroyed. What does NOT get destroyed are things that you
create and add to the things that get added to the model.
For example, if I create a font object and add that to an
axis object and add the axis object to the model, then the
model and axis are destroyed when the model is destroyed,
but not the font object.

This behavior is probably in keeping with the idea of object
persistence, but it took me a while to understand it and I
am still overcompensating in programs by adding every damn
thing to my container object. It doesn't appear to do any
harm. :-)

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: Restrucuting array problem
Next Topic: 5.0.3 -> 5.1 Remote Procedure Call troubles

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

Current Time: Fri Oct 10 17:55:32 PDT 2025

Total time taken to generate the page: 0.96179 seconds