Hi,

I had the following code in one of my classes:

   SimpleMaterialPtr m_pBackgroundMaterial = SimpleMaterial::create();

   beginEditCP(m_pBackgroundMaterial);
     m_pBackgroundMaterial->addChunk(m_pTexture);
     // m_pTexture is a TextureChunkRefPtr
   endEditCP(m_pBackgroundMaterial);

   beginEditCP(m_pPolyBack);
     m_pPolyBack->setMaterial(m_pBackgroundMaterial);
     // m_pPolyBack is a PolygonBackgroundRefPtr
   endEditCP(m_pPolyBack);


now, I had a series of stuff surviving destruction, such as the
texture and the image backing the texture. And of course the
SimpleMaterial was still living (althought the PolygonBackground
was destroyed).

Then I changed the SimpleMaterialPtr to be a member of the class
as SimpleMaterialRefPtr, on destruction of the class everything
was cleant up correctly.

I don't understand why... The m_pPolyBack destruction should
have done the job in both cases....

Regards,

   Toni

-------------------------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems?  Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >> http://get.splunk.com/
_______________________________________________
Opensg-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/opensg-users

Reply via email to