--- a/QTfrontend/main.cpp Sun Apr 03 16:31:48 2011 +0400
+++ b/QTfrontend/main.cpp Sun Apr 03 16:34:12 2011 +0200
@@ -31,6 +31,9 @@
#ifdef _WIN32
#include <Shlobj.h>
#endif
+#ifdef __APPLE__
+#include "CocoaInitializer.h"
+#endif
bool checkForDir(const QString & dir)
{
@@ -425,6 +428,10 @@
registry_hklm.setValue("Software/Hedgewars/Path", bindir->absolutePath().replace("/", "\\"));
}
#endif
+#ifdef __APPLE__
+ // this creates the autoreleasepool that prevents leaking
+ CocoaInitializer initializer;
+#endif
HWForm *Form = new HWForm();