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:
@@ -170,7 +170,7 @@ class mem_ptr
|
||||
// return s_newMemoryAdapter.get();
|
||||
// }
|
||||
//
|
||||
// T* allocate(int no) { cout<<"Allocating Memory"<<endl;return new T[no]; }
|
||||
// T* allocate(int no) { cout<<"Allocating Memory"<<endl;return osgNew T[no]; }
|
||||
//
|
||||
// virtual void ref_data(void* userData)
|
||||
// {
|
||||
|
||||
Reference in New Issue
Block a user