Fix memory release

develop
kaetemi 4 years ago
parent b220dac7b3
commit f50b59702e

@ -46,6 +46,7 @@ class CStringManagerClient
public:
// Singleton pattern implementation
static CStringManagerClient *instance();
static bool hasInstance() { return _Instance; }
static void release(bool mustReleaseStaticArrays);
/** Prepare the string manager to use a persistent string cache.
@ -388,6 +389,7 @@ public:
virtual ~IStringWaiterRemover()
{
// signal the string manager that this waiter is destroyed
if (CStringManagerClient::hasInstance())
CStringManagerClient::instance()->removeStringWaiter(this);
}
};
@ -406,6 +408,7 @@ public:
virtual ~IStringWaitCallback()
{
// signal the string manager that this waiter is destroyed
if (CStringManagerClient::hasInstance())
CStringManagerClient::instance()->removeStringWaiter(this);
}

Loading…
Cancel
Save