Refactor some dialog handling, enforce proper port disposal

This commit is contained in:
elasota
2020-01-01 20:49:18 -05:00
parent 5fe6218c28
commit 1c6ab800a7
25 changed files with 121 additions and 91 deletions

View File

@@ -3,6 +3,7 @@
#include "PLHandle.h"
#include "MemoryManager.h"
#include "MMHandleBlock.h"
#include "QDManager.h"
#include "QDPixMap.h"
#if GP_DEBUG_CONFIG
@@ -32,6 +33,11 @@ namespace PortabilityLayer
QDPort::~QDPort()
{
#if GP_DEBUG_CONFIG
// Detach the port BEFORE destroying it!!
assert(PortabilityLayer::QDManager::GetInstance()->GetPort() != this);
#endif
DisposePixMap();
}