• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
NS_INLINE and obj = nil;?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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

  • Follow-Ups:
    • Re: NS_INLINE and obj = nil;?
      • From: "Stephen J. Butler" <email@hidden>
  • Prev by Date: Re: access violation after using NSTask
  • Next by Date: Re: NS_INLINE and obj = nil;?
  • Previous by thread: Re: access violation after using NSTask
  • Next by thread: Re: NS_INLINE and obj = nil;?
  • Index(es):
    • Date
    • Thread