From 140e7468ab3677051fdee9c0030cea59c3784e7e Mon Sep 17 00:00:00 2001 From: David Elliott Date: Mon, 14 Jul 2003 13:03:18 +0000 Subject: [PATCH] Place wxAutoNSAutoreleasePool in this header git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@21950 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- include/wx/cocoa/autorelease.h | 32 ++++++++++++++++++++++++++++++++ 1 file changed, 32 insertions(+) create mode 100644 include/wx/cocoa/autorelease.h diff --git a/include/wx/cocoa/autorelease.h b/include/wx/cocoa/autorelease.h new file mode 100644 index 0000000000..eedba0fdba --- /dev/null +++ b/include/wx/cocoa/autorelease.h @@ -0,0 +1,32 @@ +///////////////////////////////////////////////////////////////////////////// +// Name: wx/cocoa/autorelease.h +// Purpose: Automatic NSAutoreleasePool functionality +// Author: David Elliott +// Modified by: +// Created: 2003/07/11 +// RCS-ID: $Id$ +// Copyright: (c) 2003 David Elliott +// Licence: wxWindows licence +///////////////////////////////////////////////////////////////////////////// + +#ifndef __WX_COCOA_AUTORELEASE_H__ +#define __WX_COCOA_AUTORELEASE_H__ + +#import + +class wxAutoNSAutoreleasePool +{ +public: + wxAutoNSAutoreleasePool() + { + m_pool = [[NSAutoreleasePool alloc] init]; + } + ~wxAutoNSAutoreleasePool() + { + [m_pool release]; + } +protected: + NSAutoreleasePool *m_pool; +}; + +#endif //__WX_COCOA_AUTORELEASE_H__