]> git.saurik.com Git - wxWidgets.git/blob - include/wx/cocoa/autorelease.h
f80e493bdaff945b1e381330424da174ca5fa268
[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 // RCS-ID: $Id$
8 // Copyright: (c) 2003 David Elliott <dfe@cox.net>
9 // Licence: wxWindows licence
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__