Hi Toni,

Antonio Bleile wrote:
> Hi,
> 
> I'm currently writing some unit-tests for my application,
> in each test I'd like to start with osgInit and end
> with osgExit (in order to detect memleaks!). But it seems
> as if the osgInit/Exit pair should be just called once
> withing a process instance.
> Is this correct? (After the second osgInit I can't
> create any OSG instances (they seem to be null)).

I don't think we ever considered supporting that. ..

I'm not sure how easy it would be to implement, as we use quite a bit of static 
inits, which cannot be redone, so some parts would have to stay around.

I think most memleaks can also be found by just testing all FCs that you create 
are actually destroyed at the end of the test. Just be aware that the 
Prototypes 
are in teh FCFactory, too, so you need to ignore those when checking. For more 
complicated things something like valgrind or Purify might be a better tool, as 
it also tells where the memory was allocated and leaked (which are usually the 
interesting questions ;).

Yours

        Dirk

-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2005.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
Opensg-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/opensg-users

Reply via email to