wxMessageBox off the main thread lost result code.
[wxWidgets.git] / include / wx / cocoa / autorelease.h
1 /////////////////////////////////////////////////////////////////////////////
2 // Name: wx/cocoa/autorelease.h
3 // Purpose: Automatic NSAutoreleasePool functionality
4 // Author: David Elliott
5 // Modified by:
6 // Created: 2003/07/11
7 // Copyright: (c) 2003 David Elliott <dfe@cox.net>
8 // Licence: wxWindows licence
9 /////////////////////////////////////////////////////////////////////////////
10
11 #ifndef __WX_COCOA_AUTORELEASE_H__
12 #define __WX_COCOA_AUTORELEASE_H__
13
14 #import <Foundation/NSAutoreleasePool.h>
15
16 class wxAutoNSAutoreleasePool
17 {
18 public:
19 wxAutoNSAutoreleasePool()
20 {
21 m_pool = [[NSAutoreleasePool alloc] init];
22 }
23 ~wxAutoNSAutoreleasePool()
24 {
25 [m_pool release];
26 }
27 protected:
28 NSAutoreleasePool *m_pool;
29 };
30
31 #endif //__WX_COCOA_AUTORELEASE_H__