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:
@@ -30,8 +30,8 @@ class SG_EXPORT StateSet : public Object
|
||||
StateSet();
|
||||
StateSet(const StateSet&,const CopyOp& copyop=CopyOp::SHALLOW_COPY);
|
||||
|
||||
virtual Object* cloneType() const { return new StateSet(); }
|
||||
virtual Object* clone(const CopyOp& copyop) const { return new StateSet(*this,copyop); }
|
||||
virtual Object* cloneType() const { return osgNew StateSet(); }
|
||||
virtual Object* clone(const CopyOp& copyop) const { return osgNew StateSet(*this,copyop); }
|
||||
virtual bool isSameKindAs(const Object* obj) const { return dynamic_cast<const StateSet*>(obj)!=NULL; }
|
||||
virtual const char* className() const { return "StateSet"; }
|
||||
|
||||
|
||||
Reference in New Issue
Block a user