]>
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 DE |
6 | // Created: 2003/07/11 |
7 | // RCS-ID: $Id$ | |
8 | // Copyright: (c) 2003 David Elliott <dfe@cox.net> | |
65571936 | 9 | // Licence: wxWindows licence |
140e7468 DE |
10 | ///////////////////////////////////////////////////////////////////////////// |
11 | ||
12 | #ifndef __WX_COCOA_AUTORELEASE_H__ | |
13 | #define __WX_COCOA_AUTORELEASE_H__ | |
14 | ||
15 | #import <Foundation/NSAutoreleasePool.h> | |
16 | ||
17 | class wxAutoNSAutoreleasePool | |
18 | { | |
19 | public: | |
20 | wxAutoNSAutoreleasePool() | |
21 | { | |
22 | m_pool = [[NSAutoreleasePool alloc] init]; | |
23 | } | |
24 | ~wxAutoNSAutoreleasePool() | |
25 | { | |
26 | [m_pool release]; | |
27 | } | |
28 | protected: | |
29 | NSAutoreleasePool *m_pool; | |
30 | }; | |
31 | ||
32 | #endif //__WX_COCOA_AUTORELEASE_H__ |