]>
Commit | Line | Data |
---|---|---|
140e7468 DE |
1 | ///////////////////////////////////////////////////////////////////////////// |
2 | // Name: wx/cocoa/autorelease.h | |
3 | // Purpose: Automatic NSAutoreleasePool functionality | |
4 | // Author: David Elliott | |
03647350 | 5 | // Modified by: |
140e7468 | 6 | // Created: 2003/07/11 |
140e7468 | 7 | // Copyright: (c) 2003 David Elliott <dfe@cox.net> |
65571936 | 8 | // Licence: wxWindows licence |
140e7468 DE |
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__ |