Hi Simon, On 09/11/2011 05:45 PM, Simon Bouvier-Zappa wrote: > Greetings, > > we've been having several problems with memory leaks regarding the > creation of materials. > > While testing with macosx Instruments leak analyzer, a test such as > > for (int i=0 ; i<10000 ; ++i) > { > OSG::SimpleMaterialRefPtr simplemat(OSG::SimpleMaterial::create()); > } > > leaks 128 kb. Not much, but varies with material paramers and material > chunks. > > Does OpenSG keep a copy of the material somewhere. Looking at creation, > I notice the presence of a material prototype that can be used at shallow > copy.
Does the tool give you any hints on where it leaks? In general the one thing that 'leaks' is the active FieldContainer vector, which currently does not compact when objects are deleted. That should only result in one pointer 'leaked' per FieldContainer, so it's not quite as much as you're seeing. Other than that I'm not aware of any systematic leaks, so any more detail would be helpful. Yours Dirk ------------------------------------------------------------------------------ Doing More with Less: The Next Generation Virtual Desktop What are the key obstacles that have prevented many mid-market businesses from deploying virtual desktops? How do next-generation virtual desktops provide companies an easier-to-deploy, easier-to-manage and more affordable virtual desktop model.http://www.accelacomm.com/jaw/sfnl/114/51426474/ _______________________________________________ Opensg-users mailing list Opensg-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/opensg-users