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.
_______________________________________________
Discuss-gnustep mailing list
[email protected]
http://lists.gnu.org/mailman/listinfo/discuss-gnustep