1
0
mirror of https://foundry.openuru.org/gitblit/r/CWE-ou-minkata.git synced 2025-07-18 19:29:09 +00:00

Plug some simple leaks detected during startup

This commit is contained in:
2013-01-04 00:00:14 -08:00
parent 2c9a9bb1a8
commit abbbfc12d7
7 changed files with 25 additions and 13 deletions

View File

@ -269,10 +269,13 @@ void pfSecurePreloader::PreloadNextFile()
void pfSecurePreloader::Init()
{
RegisterAs(kSecurePreloader_KEY);
if (!fInstance)
fInstance = new pfSecurePreloader;
fInstance->RegisterAs(kSecurePreloader_KEY);
// TODO: If we're going to support reconnects, then let's do it right.
// Later...
//plgDispatch::Dispatch()->RegisterForExactType(plNetCommAuthConnectedMsg::Index(), GetKey());
//plgDispatch::Dispatch()->RegisterForExactType(plNetCommAuthConnectedMsg::Index(), fInstance->GetKey());
}
void pfSecurePreloader::Start()
@ -431,10 +434,3 @@ void pfSecurePreloader::FilePreloaded(const wchar_t* file, hsStream* stream)
// Continue down the warpath
PreloadNextFile();
}
pfSecurePreloader* pfSecurePreloader::GetInstance()
{
if (!fInstance)
fInstance = new pfSecurePreloader;
return fInstance;
}

View File

@ -90,7 +90,7 @@ public:
plOperationProgress* GetProgressBar() { return fProgress; }
static pfSecurePreloader* GetInstance();
static pfSecurePreloader* GetInstance() { return fInstance; }
static void SetInstance(pfSecurePreloader* instance) { fInstance = instance; }
};