Hi,

> Hi,
> 
> 
>>for the second program you should free some stuff before the osgExit() call.
>>
>>delete mgr;
>>subRefCP(scene);
>>subRefCP(gwin);
> 
> 
> 
> Just curious, why are these statements not already present in the
> sample examples, any particular reason ?

well on exit everything is freed, more important are the runtime leaks.

> Anyways, I tried this and the amount of memory leaked indeed goes down
> but still present. Here is the new memory dump statistics for program
> 2 after putting above 3 statements :
> 
> With OpenSG 1.6 : 96221 bytes leaked (earlier it was 343000 bytes)
> With OpenSG CVS build :  139052 bytes leaked ( earlier it was 350116 bytes)

ok you should also destroy the glut window via glutDestroyWindow(winid) 
perhaps glut has also some leaks ... all the static stuff in OpenSG is 
actually freed after leaving the main function.

Andreas

> However the statement subRefCP(scene) causes following warning to be
> thrown by the application when exitting :
> 
> With OpenSG 1.6 :
> WARNING: FieldContainerFactory::unregisterFieldContainer:id -572662307
> inconsisent with store size 172!
> 
> With OpenSG CVS build :
> WARNING:  FieldContainerFactory::unregisterFieldContainer:id
> -572662307 inconsistent with store size 182!
> 
> Is something incorrect here ?
> 
> - Vaibhav
> 
> 
> 
>>>Hi All,
>>>
>>>Has anybody done any memory leak analysis of OpenSG  on Windows ?
>>>
>>>I tried to figure out if there are any memory leaks in OpenSG on
>>>Windows and got few memory leaks. Here is what I did :
>>>
>>>I took OpenSG tutorial example 01hello.cpp and made two cut short
>>>versions of it :
>>>Program 1 :  containing just osgInit and osgExit
>>>Program 2 :  01hello.cpp without glut motion and mouse callbacks etc
>>>
>>>[Code for these two programs is pasted below together with their
>>>memory dump statistics]
>>>
>>>Running these two programs in debug mode (with OpenSG debug libraries)
>>>shows following memory leak statistics :
>>>
>>>Program 1 (OpenSG 1.6) : 176 bytes leaked
>>>Program 1 (OpenSG current CVS build) : 4 bytes leaked
>>>
>>>Program 2 (OpenSG 1.6) : 343000 bytes  leaked
>>>Program 2 (OpenSG current CVS build) : 350116 bytes  leaked
>>>
>>>Is this kind of memory leak expected or already known to exist ? Is
>>>there anyway to avoid/fix these memory leaks ? My only worry is that
>>>if we increase the complexity of the application the memory leak might
>>>go even higher.
>>>
>>>Any comments ?
>>>
>>>Thanks,
>>>- Vaibhav
>>
>>
>>
>>-------------------------------------------------------------------------
>>Using Tomcat but need to do more? Need to support web services, security?
>>Get stuff done quickly with pre-integrated technology to make your job easier
>>Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
>>http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
>>_______________________________________________
>>Opensg-users mailing list
>>[email protected]
>>https://lists.sourceforge.net/lists/listinfo/opensg-users
>>
> 
> 
> -------------------------------------------------------------------------
> Using Tomcat but need to do more? Need to support web services, security?
> Get stuff done quickly with pre-integrated technology to make your job easier
> Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
> http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
> _______________________________________________
> Opensg-users mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/opensg-users
> 
> 


-------------------------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
Opensg-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/opensg-users

Reply via email to