mirror of
https://github.com/ZDoom/Raze.git
synced 2025-03-23 01:11:30 +00:00
free the WidgetResources file on shutdown to reduce the number of reported memory leaks.
This commit is contained in:
parent
218a617e6b
commit
9e7785e44c
2 changed files with 7 additions and 0 deletions
|
@ -12,6 +12,11 @@ void InitWidgetResources(const char* filename)
|
|||
I_FatalError("Unable to open %s", filename);
|
||||
}
|
||||
|
||||
void CloseWidgetResources()
|
||||
{
|
||||
if (WidgetResources) delete WidgetResources;
|
||||
}
|
||||
|
||||
static std::vector<uint8_t> LoadFile(const std::string& name)
|
||||
{
|
||||
auto lump = WidgetResources->FindEntry(name.c_str());
|
||||
|
|
|
@ -90,6 +90,7 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
|||
|
||||
void LoadHexFont(const char* filename);
|
||||
void InitWidgetResources(const char* basewad);
|
||||
void CloseWidgetResources();
|
||||
|
||||
CVAR(Bool, autoloadlights, true, CVAR_ARCHIVE|CVAR_GLOBALCONFIG)
|
||||
CVAR(Bool, autoloadbrightmaps, true, CVAR_ARCHIVE | CVAR_GLOBALCONFIG)
|
||||
|
@ -663,6 +664,7 @@ int GameMain()
|
|||
gi = nullptr;
|
||||
}
|
||||
DeleteStartupScreen();
|
||||
CloseWidgetResources();
|
||||
PClass::StaticShutdown();
|
||||
C_UninitCVars();
|
||||
if (Args) delete Args;
|
||||
|
|
Loading…
Reference in a new issue