Hello Marc,
Marc Hofmann wrote:
> Carsten Neumann <[email protected]> schrieb am 17.06.2009 17:40:31:
> > So, in summary I don't think you are leaking containers, but perhaps
> > some other datastructure (that may well be part of OpenSG). On linux I'd
> > recommend running your application under valgrind, for windows I'm not
> > sure what/if other tools can be used.
>
> The build in leak detection from VS2008 (_CrtDumpMemoryLeaks() etc.)
> implies that there are living OpenSG nodes, the printout is not very
> helpful. I'll take a closer look.
hm, perhaps it is detecting the prototypes? They are excluded from the
list you get with printOSGInstances(), as well as all objects created
before setting fcStoreSize.
> > > ChunkMaterialPtr mOSGMaterial =
> ChunkMaterialPtr::dcast(node->getCore());
> > > beginEditCP(mOSGMaterial);
> > > while (mOSGMaterial->getChunks().size() > 0)
> > > {
> > > StateChunkPtr chunk = mOSGMaterial->getChunks()[0];
> > > TextureChunkPtr tex_chunk = TextureChunkPtr::dcast(chunk);
> > > if (tex_chunk != NullFC)
> > > {
> > > beginEditCP(tex_chunk->getImage());
> > > tex_chunk->getImage()->clearData();
> > > endEditCP(tex_chunk->getImage());
> > >
> > > beginEditCP(tex_chunk);
> > > tex_chunk->setImage(NullFC);
> > > endEditCP(tex_chunk);
> > > }
> > > mOSGMaterial->subChunk(chunk);
> > > }
> > > endEditCP(mOSGMaterial);
> > >
> > > beginEditCP(node);
> > > node->setCore(NullFC);
> > > endEditCP(node);
> >
> > ok. have you tried just calling subChunk() for each chunk in the
> > material (together with a fix I committed on Sunday that should be
> > sufficient) ?
>
> I got the latest version from CVS, the problem is still there. Or do you
> mean calling subChunk() on a different place (because above I call
> mOSGMaterial->subChunk(chunk))?
sorry, I was a bit vague there, what I meant is: have you tried to
simplify the above loop to only contain mOSGMaterial->subChunk(chunk),
so that you do not have to look into the TextureChunk yourself?
Cheers,
Carsten
------------------------------------------------------------------------------
Crystal Reports - New Free Runtime and 30 Day Trial
Check out the new simplified licensing option that enables unlimited
royalty-free distribution of the report engine for externally facing
server and web deployment.
http://p.sf.net/sfu/businessobjects
_______________________________________________
Opensg-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/opensg-users