[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: retain, release, and autorelease operations
From: |
Jeff Teunissen |
Subject: |
Re: retain, release, and autorelease operations |
Date: |
Tue, 02 Oct 2001 18:40:03 -0400 |
Ludovic Marcotte wrote:
>
> Hi,
>
> One of my friend is porting GNUMail.app / Pantomime to MacOS-X.
>
> Since GNUstep defines RETAIN(), RELEASE(), and AUTORELEASE() as
> placeholders for GC (in a distant future), is it safe to simply define
> in both projects:
>
> #ifndef GNUSTEP_BASE_VERSION
Macros should be protected from weird things (such as calling within other
macros) by forcing them to be evaluated.
> #define RETAIN(object) [object retain]
> #define RELEASE(object) [object release]
> #define AUTORELEASE(object) [object autorelease]
#define RETAIN(obj) [(obj) retain]
#define RELEASE(obj) [(obj) release]
#define AUTORELEASE(obj) [(obj) autorelease]
Other than that, it should be fine.
--
| Jeff Teunissen -=- Pres., Dusk To Dawn Computing -=- deek @ d2dc.net
| GPG: 1024D/9840105A 7102 808A 7733 C2F3 097B 161B 9222 DAB8 9840 105A
| Core developer, The QuakeForge Project http://www.quakeforge.net/
| Specializing in Debian GNU/Linux http://www.d2dc.net/~deek/