mirror of
https://foundry.openuru.org/gitblit/r/CWE-ou-minkata.git
synced 2025-07-20 12:19:10 +00:00
Fix the "Crash on Exit" bug (cherry picked from commit b4f6ccaa88
)
We were throwing away the Dispatcher before all the keys (namely, leaked keys) were unloaded. See the comment in plResManager for more details.
This commit is contained in:
@ -103,12 +103,14 @@ plDispatch::plDispatch()
|
||||
|
||||
plDispatch::~plDispatch()
|
||||
{
|
||||
int i;
|
||||
for( i = 0; i < fRegisteredExactTypes.GetCount(); i++ )
|
||||
delete fRegisteredExactTypes[i];
|
||||
|
||||
hsAssert(fRegisteredExactTypes.GetCount() == 0, "registered type after Dispatch shutdown");
|
||||
ITrashUndelivered();
|
||||
}
|
||||
|
||||
void plDispatch::BeginShutdown()
|
||||
{
|
||||
fRegisteredExactTypes.Reset();
|
||||
ITrashUndelivered();
|
||||
}
|
||||
|
||||
void plDispatch::ITrashUndelivered()
|
||||
|
@ -131,6 +131,8 @@ public:
|
||||
|
||||
virtual hsBool SetMsgBuffering(hsBool on); // On starts deferring msg delivery until buffering is set to off again.
|
||||
|
||||
virtual void BeginShutdown();
|
||||
|
||||
static void SetMsgRecieveCallback(MsgRecieveCallback callback) { fMsgRecieveCallback = callback; }
|
||||
};
|
||||
|
||||
@ -145,7 +147,7 @@ public:
|
||||
virtual void UnRegisterForType(UInt16 hClass, const plKey& receiver) {}
|
||||
|
||||
|
||||
virtual hsBool MsgSend(plMessage* msg) {}
|
||||
virtual hsBool MsgSend(plMessage* msg) {}
|
||||
virtual void MsgQueue(plMessage* msg){}
|
||||
virtual void MsgQueueProcess(){}
|
||||
|
||||
|
Reference in New Issue
Block a user