Remove textures with no references
This commit is contained in:
1 parent
7f8e974fe1
commit
37aa8e5219
3 files changed
+15
-2
No files matched your search
@@ -177,7 +177,9 @@ namespace Vocaluxe.Base
|
||||
|
||||
public static void RemoveTexture(ref CTextureRef texture)
|
||||
{
|
||||
_Draw.RemoveTexture(ref texture);
|
||||
// Disposed textures call this, possibly at program end!
|
||||
if (_Draw != null)
|
||||
_Draw.RemoveTexture(ref texture);
|
||||
}
|
||||
|
||||
public static void DrawTexture(CTextureRef texture)
|
||||
|
||||
@@ -383,6 +383,7 @@ namespace Vocaluxe.Lib.Draw
|
||||
_Textures.Remove(texture.ID);
|
||||
}
|
||||
}
|
||||
texture.ID = -1;
|
||||
texture = null;
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user