]> git.saurik.com Git - wxWidgets.git/blobdiff - samples/treelay/treelay.cpp
make wxArtProvider pure virtual (I was not so on
[wxWidgets.git] / samples / treelay / treelay.cpp
index 02e00da18c5494f659ba5ea0f43ede5b92aaaaa8..41d2671a9c8de7ca5b2b5348a02bc822a5fc601f 100644 (file)
@@ -24,7 +24,7 @@
 
 #include "treelay.h"
 
-wxTreeLayoutStored *myTree = NULL;
+wxTreeLayoutStored *myTree = (wxTreeLayoutStored *) NULL;
 
 // A macro needed for some compilers (AIX) that need 'main' to be defined
 // in the application itself.
@@ -85,6 +85,17 @@ bool MyApp::OnInit()
   return TRUE;
 }
 
+int MyApp::OnExit()
+{
+    if (myTree)
+    {
+        delete myTree;
+        myTree = (wxTreeLayoutStored *) NULL;
+    }
+
+    return 0;
+}
+
 void MyApp::TreeTest(wxTreeLayoutStored& tree, wxDC& dc)
 {
   tree.Initialize(200);