Hi Viggo, On Fri, Jul 25, 2008 at 7:22 AM, Viggo Løvli <[EMAIL PROTECTED]> wrote: > Hi Robert, > > My current code instances a new one each cull traverse. I wonder if that > means I get a sizeof(osgUtil::RenderBin) memory leak each cull-traverse?
The rendering backend uses ref_ptr<>'s so there shouldn't be any leak, assigning the new RenderBin will lead to the previous one being deleted. > Anyway, I am going to try to multi-buffer it. > I should be able to count the number of cull-traverse calls I get for each > update tranverse. That (I guess) should tell me automatically how many > instances of osgUtil::RenderBin that I would need. I will multiply it by two > for double buffering and then it should work like a dream. Rather than second guess what will be need might I suggest you maintain a recycling list of ref_ptr<> to your custom RenderBin, then traverse this list to find an entry that has a referenceCount() of one, then take ownership of this. Robert. _______________________________________________ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org