HI Manu, I generally cringe a hacks to get round bugs in other software, and this does look a case of this here, the profiler you are using is buggy and producing false positives. Adding a clear method is potentially dangerous if called at the wrong time, so the naming of such a method would have to very clearly reflect its purpose, just calling it clear wouldn't cut it. I not totally opposed to such a method it does allow you to workaround a problem. W.r.t submissions see:
http://www.openscenegraph.org/projects/osg/wiki/MailingLists/SubmissionsProtocol Robert. On Dec 15, 2007 12:07 AM, Emmanuel Roche <[EMAIL PROTECTED]> wrote: > Hi everyone, > > just a simple request stil on the introspection framework: > > I have noticed that the Types and Converters are stored in a static > structure in the Reflection class... and this structure is totally > unaccessible. (Well we could still use Reflection::getTypes() to get the > type map and delete every type one by one after a const cast, but for the > converters map that's not possible. > > The problem with this kind of static structure, is that they are destroyed > only at the very end of your process, and when it comes to profiling > questions this gives a big mess (at least on Windows...) : My profiler > (AQTime 5) is simply considering all the reflection allocations as memory > leaks !... > > I guess it would not be a bad idea to add a simple "clear" static function > to the reflection class to simply delete the static_data member and set it > to NULL. This could even prove useful in [I admit very specific and very > strange] cases where people would want to stop reflecting every types and > restart with new types... > > Could some one remind me how to process to submit a code change ? (except if > someone else can add this "clear" or whatever function directly... it should > only be two lines of code anyway: > > void clear() { > if(_static_data) > delete _static_data; > _static_data = 0; > } > > regards, > > Manu. > > > _______________________________________________ > 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

