Hi Cedric, I'm just quickly scanning through osg-users as I'm only around briefly before I head off on another weeks trip, this means I don't have time to dive in and start reviewing code and thinking about various possibilities.
The best I can do right now is to give you my first gut reaction. First up I have now strong opinion on this general feature, the only key part would be that it doesn't affect performance or overcomplicate code and risk introducing bugs. Second thought is that having multiple interfaces that can be customized would complicate the API and implementation, so might it be possible wrap it all up in one customizable functor i.e something like generalizing the DeleteHandler so it can do what it does right now and do the extra stuff you want. It might need renaming as a class, but I doubt it would affect too many users as DeleteHandler is a very niche feature. Robert. On Mon, Aug 2, 2010 at 8:39 AM, Cedric Pinson <[email protected]> wrote: > Hi Robert, > > I have work on a small tool to detect how a program evolve during time, > It tracks the numer of instance of each object inherited from > osg::Referenced. I use this to detect 'leak' but release when quitting > the program so not really a leak but to detect consumption of too much > memory during runtime. > The tool to works need modification in osg::Referenced. because there is > already a mecanism to set a custom DeleteHandler, I thought we could do > the same to intercept instanciation of osg::Referenced with a custom > InstanceHandler ? > > In my use case, I have used a NodeCallBack that dump every second the > current instance of Referenced and Object, then I have used a function > to dump the gnuplot script from the data store each seconds. > Some screenshoot will help to understand how I use it: > > http://plopbyte.net/tmp/combined.png > http://plopbyte.net/tmp/individual.png > > here the data generated to build the graph > http://plopbyte.net/tmp/data.dat > http://plopbyte.net/tmp/plot.script > > > What do you think ? > > I have attached my modified Referenced and Referenced.cpp to work with > my tool, but It would need to be more generic like the DeleteHandler to > enter in OSG. > > > > Cheers, > Cedric > > -- > Provide OpenGL, WebGL and OpenSceneGraph services > +33 659 598 614 Cedric Pinson mailto:[email protected] > http://www.plopbyte.net > > _______________________________________________ > osg-users mailing list > [email protected] > http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org > > _______________________________________________ osg-users mailing list [email protected] http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

