mirror of
https://github.com/id-Software/DOOM-3-BFG.git
synced 2025-03-14 06:34:10 +00:00
Fix a few remaining leaks in idFont, SWF Scripts, and idTrigger_Touch
This commit is contained in:
parent
cb209718be
commit
04c638fb28
6 changed files with 24 additions and 4 deletions
|
@ -1290,6 +1290,17 @@ idTrigger_Touch::idTrigger_Touch()
|
|||
clipModel = NULL;
|
||||
}
|
||||
|
||||
/*
|
||||
================
|
||||
idTrigger_Touch::~idTrigger_Touch
|
||||
================
|
||||
*/
|
||||
idTrigger_Touch::~idTrigger_Touch()
|
||||
{
|
||||
// SRS - Delete clipModel on cleanup, otherwise will leak
|
||||
delete clipModel;
|
||||
}
|
||||
|
||||
/*
|
||||
================
|
||||
idTrigger_Touch::Spawn
|
||||
|
|
|
@ -272,6 +272,7 @@ private:
|
|||
class idTrigger_Touch : public idTrigger
|
||||
{
|
||||
public:
|
||||
~idTrigger_Touch();
|
||||
|
||||
CLASS_PROTOTYPE( idTrigger_Touch );
|
||||
|
||||
|
|
|
@ -86,6 +86,14 @@ idFont::~idFont
|
|||
*/
|
||||
idFont::~idFont()
|
||||
{
|
||||
// SRS - Free glyph data before deleting fontInfo, otherwise will leak
|
||||
if( fontInfo )
|
||||
{
|
||||
Mem_Free( fontInfo->glyphData );
|
||||
fontInfo->glyphData = NULL;
|
||||
Mem_Free( fontInfo->charIndex );
|
||||
fontInfo->charIndex = NULL;
|
||||
}
|
||||
delete fontInfo;
|
||||
}
|
||||
|
||||
|
|
|
@ -112,7 +112,7 @@ public:
|
|||
}
|
||||
}
|
||||
private:
|
||||
int refCount;
|
||||
std::atomic<int> refCount;
|
||||
};
|
||||
|
||||
/*
|
||||
|
@ -281,7 +281,7 @@ private:
|
|||
// RB end
|
||||
|
||||
private:
|
||||
int refCount;
|
||||
std::atomic<int> refCount;
|
||||
|
||||
uint16 flags;
|
||||
const byte* data;
|
||||
|
|
|
@ -184,7 +184,7 @@ public:
|
|||
void PrintToConsole() const;
|
||||
|
||||
private:
|
||||
int refCount;
|
||||
std::atomic<int> refCount;
|
||||
bool noAutoDelete;
|
||||
|
||||
enum swfNamedVarFlags_t
|
||||
|
|
|
@ -58,7 +58,7 @@ public:
|
|||
}
|
||||
|
||||
private:
|
||||
int refCount;
|
||||
std::atomic<int> refCount;
|
||||
};
|
||||
|
||||
/*
|
||||
|
|
Loading…
Reference in a new issue