Hey All, quick question,

I wrote a simple macro to make memory cleanup a bit easier, but I ran
into something I'm not sure why is happening..

here's the macro:

NS_INLINE void GDRelease(id obj) {
        [obj release];
        obj=nil;
}

I use it like:

- (void) dealloc {
    GDRelease(myObject);
    [super dealloc];
}

What I'm running into is that it isn't successfully nil'ing out the
obj. It is sending it a release, but the "obj = nil" doesn't seem to
work. Any ideas?

Thanks much!
_______________________________________________

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com

Reply via email to