[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: The orca, GNUstep's mascot
From: |
Graham J Lee |
Subject: |
Re: The orca, GNUstep's mascot |
Date: |
Tue, 29 Apr 2008 07:39:35 +0100 |
Hi Gregory,
On 28 Apr 2008, at 22:52, Gregory John Casamento wrote:
Damn... yes, I was thinking of TEST_RELEASE.
[...]
Gregory John Casamento wrote:
RELEASE is a #define which does the standard checking that needs to
be done when doing a release.
In what way needs to be done? The scenarios for sending [obj release]
are:
1. obj is nil; nothing happens.
2. obj is not an id; crash (if you're lucky).
3. obj is an id which does not respond to @selector(release), and has
no forwarding mechanism; runtime exception.
4. obj is an id which responds to @selector(release) or consumes it in
some other way; it does its stuff.
Case 1 is a special example of case 4, so case 2 needs to be tested
for and some might argue case 3. But the macro is defined as:
#define TEST_RELEASE(object) ({ if (object) [object release]; })
which doesn't provide that.
Thanks,
Graham.
- Re: The orca, GNUstep's mascot, (continued)
- Re: The orca, GNUstep's mascot, Gregory John Casamento, 2008/04/21
- Re: The orca, GNUstep's mascot, Gregory John Casamento, 2008/04/25
- Re: The orca, GNUstep's mascot, Gregory John Casamento, 2008/04/28
- Re: The orca, GNUstep's mascot, address@hidden, 2008/04/28
- Re: The orca, GNUstep's mascot, Gregory John Casamento, 2008/04/28
- Re: The orca, GNUstep's mascot, Gregory John Casamento, 2008/04/28
- Re: The orca, GNUstep's mascot,
Graham J Lee <=