diff --git a/dgl/src/App.cpp b/dgl/src/App.cpp index 1b37ca32..cf4d046f 100644 --- a/dgl/src/App.cpp +++ b/dgl/src/App.cpp @@ -32,6 +32,12 @@ struct App::PrivateData { PrivateData() : doLoop(false), visibleWindows(0) {} + + ~PrivateData() + { + windows.clear(); + idleCallbacks.clear(); + } }; // ----------------------------------------------------------------------- @@ -43,8 +49,6 @@ App::App() App::~App() { - pData->windows.clear(); - pData->idleCallbacks.clear(); delete pData; }