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:
@@ -289,7 +289,7 @@ char *osgDB::findDSO( const char *name )
|
||||
|
||||
// failed with direct paths,
|
||||
// now try prepending the filename with "osgPlugins/"
|
||||
char* prependosgPlugins = new char[strlen(name)+12];
|
||||
char* prependosgPlugins = osgNew char[strlen(name)+12];
|
||||
strcpy(prependosgPlugins,"osgPlugins/");
|
||||
strcat(prependosgPlugins,name);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user