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:
@@ -22,8 +22,8 @@ class StateSet;
|
||||
* the standard pure virtual methods which are required for all Object
|
||||
* subclasses.*/
|
||||
#define META_StateAttribute(name,type) \
|
||||
virtual osg::Object* cloneType() const { return new name(); } \
|
||||
virtual osg::Object* clone(const osg::CopyOp& copyop) const { return new name (*this,copyop); } \
|
||||
virtual osg::Object* cloneType() const { return osgNew name(); } \
|
||||
virtual osg::Object* clone(const osg::CopyOp& copyop) const { return osgNew name (*this,copyop); } \
|
||||
virtual bool isSameKindAs(const osg::Object* obj) const { return dynamic_cast<const name *>(obj)!=NULL; } \
|
||||
virtual const char* className() const { return #name; } \
|
||||
virtual const Type getType() const { return type; }
|
||||
|
||||
Reference in New Issue
Block a user