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:
Robert Osfield
2002-03-26 23:52:52 +00:00
parent 72ff3186df
commit 84d2d01163
107 changed files with 469 additions and 435 deletions

View File

@@ -4,7 +4,7 @@
using namespace std;
osg::NotifySeverity osg::g_NotifyLevel = osg::NOTICE;
std::ofstream *osg::g_NotifyNulStream;
std::auto_ptr<ofstream> osg::g_NotifyNulStream;
bool osg::g_NotifyInit = false;
void osg::setNotifyLevel(osg::NotifySeverity severity)
@@ -29,9 +29,9 @@ bool osg::initNotifyLevel()
// set up global notify null stream for inline notify
#if defined(WIN32) && !defined(__CYGWIN__)
g_NotifyNulStream = new std::ofstream ("nul");
g_NotifyNulStream.reset(osgNew std::ofstream ("nul"));
#else
g_NotifyNulStream = new std::ofstream ("/dev/null");
g_NotifyNulStream.reset(osgNew std::ofstream ("/dev/null"));
#endif
// g_NotifyLevel