Added support for osg::MemoryManager which is based upon Paul Nettle's
memory manager published at flipcode.com. This can be turned on with the OSG_USE_MEMORY_MANGER option which then uses custom global new and delete operators as well as provide osgNew and osgDelete macro's which add ability to log line and file from which calls are made. Updated osg,osgUtil,osgDB,osgText and osgPlugins/osg to use osgNew/osgDelete, and fixed memory leaks highlighted by the new memory manager.
This commit is contained in:
@@ -14,7 +14,7 @@ bool Transform_writeLocalData(const Object& obj, Output& fw);
|
||||
// register the read and write functions with the osgDB::Registry.
|
||||
RegisterDotOsgWrapperProxy g_TransformProxy
|
||||
(
|
||||
new osg::Transform,
|
||||
osgNew osg::Transform,
|
||||
"Transform",
|
||||
"Object Node Transform Group",
|
||||
&Transform_readLocalData,
|
||||
@@ -25,7 +25,7 @@ RegisterDotOsgWrapperProxy g_TransformProxy
|
||||
// register old style 'DCS' read and write functions with the osgDB::Registry.
|
||||
RegisterDotOsgWrapperProxy g_DCSProxy
|
||||
(
|
||||
new osg::Transform,
|
||||
osgNew osg::Transform,
|
||||
"DCS",
|
||||
"Object Node Group DCS",
|
||||
&Transform_readLocalData,
|
||||
@@ -62,7 +62,7 @@ bool Transform_readLocalData(Object& obj, Input& fr)
|
||||
|
||||
transform.setMatrix(*tmpMatrix);
|
||||
|
||||
delete tmpMatrix;
|
||||
osgDelete tmpMatrix;
|
||||
|
||||
iteratorAdvanced = true;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user