Skip to content

Instantly share code, notes, and snippets.

Created January 4, 2013 15:28
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save anonymous/4453451 to your computer and use it in GitHub Desktop.
Save anonymous/4453451 to your computer and use it in GitHub Desktop.
Apple's weak @Property example
// The following declaration is similar to "@property(assign) MyClass *myObject;"
// except that if the MyClass instance is deallocated,
// the property value is set to nil instead of remaining as a dangling pointer.
@property(weak) MyClass *myObject;
@vgrichina
Copy link

Here's simple NSObject category that can be used to debug it http://www.componentix.com/blog/28/debug-usage-of-objectivec-weak-properties-with-kvo

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment