forked from mirror/openmw-tes3mp
Leak fix
This commit is contained in:
parent
7a2a7633d5
commit
af7cbb2e3b
6 changed files with 27 additions and 0 deletions
|
@ -13,6 +13,11 @@ namespace Resource
|
||||||
mSceneManager.reset(new SceneManager(vfs, mTextureManager.get()));
|
mSceneManager.reset(new SceneManager(vfs, mTextureManager.get()));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
ResourceSystem::~ResourceSystem()
|
||||||
|
{
|
||||||
|
// this has to be defined in the .cpp file as we can't delete incomplete types
|
||||||
|
}
|
||||||
|
|
||||||
SceneManager* ResourceSystem::getSceneManager()
|
SceneManager* ResourceSystem::getSceneManager()
|
||||||
{
|
{
|
||||||
return mSceneManager.get();
|
return mSceneManager.get();
|
||||||
|
|
|
@ -21,6 +21,7 @@ namespace Resource
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
ResourceSystem(const VFS::Manager* vfs);
|
ResourceSystem(const VFS::Manager* vfs);
|
||||||
|
~ResourceSystem();
|
||||||
|
|
||||||
SceneManager* getSceneManager();
|
SceneManager* getSceneManager();
|
||||||
TextureManager* getTextureManager();
|
TextureManager* getTextureManager();
|
||||||
|
@ -32,6 +33,9 @@ namespace Resource
|
||||||
std::auto_ptr<TextureManager> mTextureManager;
|
std::auto_ptr<TextureManager> mTextureManager;
|
||||||
|
|
||||||
const VFS::Manager* mVFS;
|
const VFS::Manager* mVFS;
|
||||||
|
|
||||||
|
ResourceSystem(const ResourceSystem&);
|
||||||
|
void operator = (const ResourceSystem&);
|
||||||
};
|
};
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -70,6 +70,11 @@ namespace Resource
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
|
SceneManager::~SceneManager()
|
||||||
|
{
|
||||||
|
// this has to be defined in the .cpp file as we can't delete incomplete types
|
||||||
|
}
|
||||||
|
|
||||||
osg::ref_ptr<const osg::Node> SceneManager::getTemplate(const std::string &name)
|
osg::ref_ptr<const osg::Node> SceneManager::getTemplate(const std::string &name)
|
||||||
{
|
{
|
||||||
std::string normalized = name;
|
std::string normalized = name;
|
||||||
|
|
|
@ -32,6 +32,7 @@ namespace Resource
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
SceneManager(const VFS::Manager* vfs, Resource::TextureManager* textureManager);
|
SceneManager(const VFS::Manager* vfs, Resource::TextureManager* textureManager);
|
||||||
|
~SceneManager();
|
||||||
|
|
||||||
/// Get a read-only copy of this scene "template"
|
/// Get a read-only copy of this scene "template"
|
||||||
osg::ref_ptr<const osg::Node> getTemplate(const std::string& name);
|
osg::ref_ptr<const osg::Node> getTemplate(const std::string& name);
|
||||||
|
@ -69,6 +70,9 @@ namespace Resource
|
||||||
|
|
||||||
typedef std::map<std::string, osg::ref_ptr<const NifOsg::KeyframeHolder> > KeyframeIndex;
|
typedef std::map<std::string, osg::ref_ptr<const NifOsg::KeyframeHolder> > KeyframeIndex;
|
||||||
KeyframeIndex mKeyframeIndex;
|
KeyframeIndex mKeyframeIndex;
|
||||||
|
|
||||||
|
SceneManager(const SceneManager&);
|
||||||
|
void operator = (const SceneManager&);
|
||||||
};
|
};
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -42,6 +42,11 @@ namespace Resource
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
TextureManager::~TextureManager()
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
void TextureManager::setUnRefImageDataAfterApply(bool unref)
|
void TextureManager::setUnRefImageDataAfterApply(bool unref)
|
||||||
{
|
{
|
||||||
mUnRefImageDataAfterApply = unref;
|
mUnRefImageDataAfterApply = unref;
|
||||||
|
|
|
@ -21,6 +21,7 @@ namespace Resource
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
TextureManager(const VFS::Manager* vfs);
|
TextureManager(const VFS::Manager* vfs);
|
||||||
|
~TextureManager();
|
||||||
|
|
||||||
// TODO: texture filtering settings
|
// TODO: texture filtering settings
|
||||||
|
|
||||||
|
@ -48,6 +49,9 @@ namespace Resource
|
||||||
osg::ref_ptr<osg::Texture2D> mWarningTexture;
|
osg::ref_ptr<osg::Texture2D> mWarningTexture;
|
||||||
|
|
||||||
bool mUnRefImageDataAfterApply;
|
bool mUnRefImageDataAfterApply;
|
||||||
|
|
||||||
|
TextureManager(const TextureManager&);
|
||||||
|
void operator = (const TextureManager&);
|
||||||
};
|
};
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue