mirror of
https://github.com/OpenMW/openmw.git
synced 2025-02-06 10:45:33 +00:00
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()));
|
||||
}
|
||||
|
||||
ResourceSystem::~ResourceSystem()
|
||||
{
|
||||
// this has to be defined in the .cpp file as we can't delete incomplete types
|
||||
}
|
||||
|
||||
SceneManager* ResourceSystem::getSceneManager()
|
||||
{
|
||||
return mSceneManager.get();
|
||||
|
|
|
@ -21,6 +21,7 @@ namespace Resource
|
|||
{
|
||||
public:
|
||||
ResourceSystem(const VFS::Manager* vfs);
|
||||
~ResourceSystem();
|
||||
|
||||
SceneManager* getSceneManager();
|
||||
TextureManager* getTextureManager();
|
||||
|
@ -32,6 +33,9 @@ namespace Resource
|
|||
std::auto_ptr<TextureManager> mTextureManager;
|
||||
|
||||
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)
|
||||
{
|
||||
std::string normalized = name;
|
||||
|
|
|
@ -32,6 +32,7 @@ namespace Resource
|
|||
{
|
||||
public:
|
||||
SceneManager(const VFS::Manager* vfs, Resource::TextureManager* textureManager);
|
||||
~SceneManager();
|
||||
|
||||
/// Get a read-only copy of this scene "template"
|
||||
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;
|
||||
KeyframeIndex mKeyframeIndex;
|
||||
|
||||
SceneManager(const SceneManager&);
|
||||
void operator = (const SceneManager&);
|
||||
};
|
||||
|
||||
}
|
||||
|
|
|
@ -42,6 +42,11 @@ namespace Resource
|
|||
|
||||
}
|
||||
|
||||
TextureManager::~TextureManager()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
void TextureManager::setUnRefImageDataAfterApply(bool unref)
|
||||
{
|
||||
mUnRefImageDataAfterApply = unref;
|
||||
|
|
|
@ -21,6 +21,7 @@ namespace Resource
|
|||
{
|
||||
public:
|
||||
TextureManager(const VFS::Manager* vfs);
|
||||
~TextureManager();
|
||||
|
||||
// TODO: texture filtering settings
|
||||
|
||||
|
@ -48,6 +49,9 @@ namespace Resource
|
|||
osg::ref_ptr<osg::Texture2D> mWarningTexture;
|
||||
|
||||
bool mUnRefImageDataAfterApply;
|
||||
|
||||
TextureManager(const TextureManager&);
|
||||
void operator = (const TextureManager&);
|
||||
};
|
||||
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue