2003-07-14 13:03:18 +00:00
|
|
|
/////////////////////////////////////////////////////////////////////////////
|
|
|
|
// 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 <dfe@cox.net>
|
2004-05-23 20:53:33 +00:00
|
|
|
// Licence: wxWindows licence
|
2003-07-14 13:03:18 +00:00
|
|
|
/////////////////////////////////////////////////////////////////////////////
|
|
|
|
|
|
|
|
#ifndef __WX_COCOA_AUTORELEASE_H__
|
|
|
|
#define __WX_COCOA_AUTORELEASE_H__
|
|
|
|
|
|
|
|
#import <Foundation/NSAutoreleasePool.h>
|
|
|
|
|
|
|
|
class wxAutoNSAutoreleasePool
|
|
|
|
{
|
|
|
|
public:
|
|
|
|
wxAutoNSAutoreleasePool()
|
|
|
|
{
|
|
|
|
m_pool = [[NSAutoreleasePool alloc] init];
|
|
|
|
}
|
|
|
|
~wxAutoNSAutoreleasePool()
|
|
|
|
{
|
|
|
|
[m_pool release];
|
|
|
|
}
|
|
|
|
protected:
|
|
|
|
NSAutoreleasePool *m_pool;
|
|
|
|
};
|
|
|
|
|
|
|
|
#endif //__WX_COCOA_AUTORELEASE_H__
|