iphone - How can I make a weak reference to a parent object when using properties? -


I'm not sure about this, can I do this?

  @ Property (nonomatic) myprint object * parent object;  

Note that I have left only the retaining keywords or I have to write the setter myself?

Instead of retaining , you assign attribute (which is actually the default). Assign will prevent your generated setter from parentObject to continue or release. For example:

  @property (assign, non-metic) MyParentObject * parentObject;  

Take a look at a list of all the properties that can be used by objective-qualities.


Comments

Popular posts from this blog

python - Overriding the save method in Django ModelForm -

html - CSS autoheight, but fit content to height of div -

qt - How to prevent QAudioInput from automatically boosting the master volume to 100%? -