NS_INLINE and obj = nil;?
NS_INLINE and obj = nil;?
- Subject: NS_INLINE and obj = nil;?
- From: aaron smith <email@hidden>
- Date: Fri, 1 Jan 2010 20:01:35 -0800
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 (email@hidden)
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:
This email sent to email@hidden