Try to get rid of memory leak in IOManager
git-svn-id: http://www.openmesh.org/svnrepo/OpenMesh/trunk@830 fdac6126-5c0c-442c-9429-916003d36597
This commit is contained in:
@@ -101,13 +101,19 @@ class OPENMESHDLLEXPORT _IOManager_
|
||||
{
|
||||
private:
|
||||
|
||||
/// Constructor has nothing todo for the Manager
|
||||
_IOManager_() {}
|
||||
|
||||
/// Destructor has nothing todo for the Manager
|
||||
~_IOManager_() {};
|
||||
|
||||
/** Declare the singleton getter function as friend to access the private constructor
|
||||
and destructor
|
||||
*/
|
||||
friend OPENMESHDLLEXPORT _IOManager_& IOManager();
|
||||
|
||||
|
||||
public:
|
||||
|
||||
|
||||
/**
|
||||
Read a mesh from file _filename. The target data structure is specified
|
||||
by the given BaseImporter. The \c read method consecutively queries all
|
||||
@@ -247,12 +253,10 @@ private:
|
||||
//=============================================================================
|
||||
|
||||
|
||||
extern _IOManager_* __IOManager_instance;
|
||||
//_IOManager_* __IOManager_instance; Causes memory leak, as destructor is never called
|
||||
|
||||
OPENMESHDLLEXPORT _IOManager_& IOManager();
|
||||
|
||||
|
||||
|
||||
//=============================================================================
|
||||
} // namespace IO
|
||||
} // namespace OpenMesh
|
||||
|
||||
Reference in New Issue
Block a user