mirror of
https://github.com/ZDoom/raze-gles.git
synced 2024-11-10 23:02:03 +00:00
- properly delete backing images in the texture manager.
Although the images themselves are automatically taken down, any memory they allocate is not - and some of the special tile classes do need dynamic storage.
This commit is contained in:
parent
4f7c0b696c
commit
197a5f642a
3 changed files with 7 additions and 1 deletions
|
@ -1242,7 +1242,7 @@ int WINAPI wWinMain (HINSTANCE hInstance, HINSTANCE nothing, LPWSTR cmdline, int
|
||||||
_CrtSetDbgFlag (_CrtSetDbgFlag(0) | _CRTDBG_LEAK_CHECK_DF);
|
_CrtSetDbgFlag (_CrtSetDbgFlag(0) | _CRTDBG_LEAK_CHECK_DF);
|
||||||
|
|
||||||
// Use this to break at a specific allocation number.
|
// Use this to break at a specific allocation number.
|
||||||
//_crtBreakAlloc = 227524;
|
//_crtBreakAlloc = 291757;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
int ret = DoMain (hInstance);
|
int ret = DoMain (hInstance);
|
||||||
|
|
|
@ -57,6 +57,11 @@ FImageTexture::FImageTexture(FImageSource *img) noexcept
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
FImageTexture::~FImageTexture()
|
||||||
|
{
|
||||||
|
delete mImage;
|
||||||
|
}
|
||||||
|
|
||||||
void FImageTexture::SetFromImage()
|
void FImageTexture::SetFromImage()
|
||||||
{
|
{
|
||||||
auto img = mImage;
|
auto img = mImage;
|
||||||
|
|
|
@ -357,6 +357,7 @@ protected:
|
||||||
void SetFromImage();
|
void SetFromImage();
|
||||||
public:
|
public:
|
||||||
FImageTexture(FImageSource* image) noexcept;
|
FImageTexture(FImageSource* image) noexcept;
|
||||||
|
~FImageTexture();
|
||||||
TArray<uint8_t> Get8BitPixels(bool alphatex) override;
|
TArray<uint8_t> Get8BitPixels(bool alphatex) override;
|
||||||
|
|
||||||
void SetImage(FImageSource* img)
|
void SetImage(FImageSource* img)
|
||||||
|
|
Loading…
Reference in a new issue