Re: Yet another object graphics question [message #42782 is a reply to message #42781] |
Thu, 24 February 2005 06:42   |
David Fanning
Messages: 11724 Registered: August 2001
|
Senior Member |
|
|
Antonio Santiago writes:
> You can use an IDL_Container object to contains all helper object (like
> IDLgrFont).
> In my case, i store the reference in an IDL_Conteiner. At the moment of
> the destruction, one called to
> OBJ_DESTROY, container
> destroy all its associated object.
>
> In my particular case, I use IDL objects to work with Object Graphics
> and many times stores references to helper objects as class attributes.
> Perhaps it will be usefull for you.
Yes, good advice, especially the object part. I was just looking to
see how I did this, and it is always with objects.
But I was thinking that your main program could have a garbage
container, and that you could pass a reference to that to
your function, too. The function could put all the "helper"
objects into the container before it returned. That way you
have one container to destroy at the end and you get everything.
Cheers,
David
--
David Fanning, Ph.D.
Fanning Software Consulting, Inc.
Coyote's Guide to IDL Programming: http://www.dfanning.com/
|
|
|