[IGSTK-Users] Scene Graph & Memory

Patrick Cheng cheng at isis.georgetown.edu
Thu Jun 10 12:27:20 EDT 2010


Hi Jake,

You are 90% right.

The SceneGraphNode is added to SceneGraph by observing SceneGraph 
connection events, not at object construction.

Most of the the SceneGraph classes uses raw pointers, except 
SceneGraphObserver, which uses itkSmartPointer.

As you noticed, SceneGraph and its internal SceneGraphNode is not being 
deconstructed properly. We need to delete scene graph explicitly in 
application deconstructor.

Jake, do you mind log this a bug?

Thank you,

Patrick

On 6/9/2010 7:16 PM, Jake McIvor wrote:
> I have a question on the workings of the Scene Graph:
>
> Based on my understanding, a new instance of the SceneGraph class is
> created the first time a SceneGraphObserver is created through the
> coordinate system interface. Whenever a new object is created, a new
> SceneGraphObserver is created and a new SceneGraphNode is added to the
> existing SceneGraph (a singleton pattern).
>
> When an object is destroyed, the SceneGraphObserver is destroyed.
>
> When/how should the SceneGraphNodes and SceneGraph be deleted?
>
>
> Jake
>
> --
> Jake McIvor
> MASc Candidate, Biomedical Engineering
> University of British Columbia
>
>
>
> _______________________________________________
> Powered by www.kitware.com
>
> Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html
>
> Follow this link to subscribe/unsubscribe:
> http://public.kitware.com/cgi-bin/mailman/listinfo/igstk-users



More information about the IGSTK-Users mailing list