Removed the osg::Referenced::createCount() and deleteCount() methods and
associated variables which were only compiled in on debug build. These optional methods/static vars were causingproblems when mixing debug and release builds.
This commit is contained in:
@@ -17,12 +17,6 @@ DeleteHandler* Referenced::getDeleteHandler()
|
||||
return s_deleteHandler.get();
|
||||
}
|
||||
|
||||
|
||||
#ifdef OSG_COMPILE_UNIT_TESTS
|
||||
int Referenced::_createdCount = 0;
|
||||
int Referenced::_deletedCount = 0;
|
||||
#endif
|
||||
|
||||
Referenced::~Referenced()
|
||||
{
|
||||
if (_refCount>0)
|
||||
@@ -30,9 +24,6 @@ Referenced::~Referenced()
|
||||
notify(WARN)<<"Warning: deleting still referenced object "<<this<<" of type '"<<typeid(this).name()<<"'"<<std::endl;
|
||||
notify(WARN)<<" the final reference count was "<<_refCount<<", memory corruption possible."<<std::endl;
|
||||
}
|
||||
#ifdef OSG_COMPILE_UNIT_TESTS
|
||||
_deletedCount ++;
|
||||
#endif
|
||||
}
|
||||
|
||||
}; // end of namespace osg
|
||||
|
||||
@@ -142,19 +142,6 @@ void SceneView::update()
|
||||
if (!_initCalled) init();
|
||||
|
||||
|
||||
#ifdef OSG_USE_MEMORY_MANAGER
|
||||
m_validateAllAllocUnits();
|
||||
#endif
|
||||
//std::cout<<std::endl;
|
||||
//std::cout<<std::endl;
|
||||
//std::cout<<"*************************** New frame ************"<<std::endl;
|
||||
|
||||
|
||||
#ifdef OSG_COMPILE_UNIT_TESTS
|
||||
std::cout<<"Number of objects created ="<<osg::Referenced::createdCount()<<" deleted = "<<osg::Referenced::deletedCount()<<std::endl;
|
||||
std::cout<<" Number of active objects ="<<osg::Referenced::createdCount()-osg::Referenced::deletedCount()<<std::endl;
|
||||
#endif
|
||||
|
||||
if (_sceneData.valid() && _updateVisitor.valid())
|
||||
{
|
||||
_updateVisitor->reset();
|
||||
|
||||
Reference in New Issue
Block a user