objective c - Properties in dealloc: release then set to nil? or simply release -


I'm new to Objective-C (and stack overflow) and I'm a little bit of a quality.

My understanding is that when you do it completely with a property, you can release them and avoid the bug and set it to zero at the same time, so that in the subsequent messages the exception Change is zero.

Blockquote>

[myProperty release], myProperty = nil;

However, when it comes to dealloc for the properties of 'copy' and 'retaining', then there is no need to do both? Or a simple

[myProperty release] Is it cut? Also, am I right that I do not need to release 'Assign' property in DeLock?

Thanks! Release

but do not disturb the setting of zero. Setting zero through your @ synthesized setter:

  MimarPruth = Nil  

will issue its old value as part of the reassignment, comments, may have unwanted side effects), but specify only zero in your member variable:

  myProperty = nil  

will not be.

  [myProperty release]  

You need it.

(And you are correct about "Assign" properties.)


Comments

Popular posts from this blog

Eclipse CDT variable colors in editor -

AJAX doesn't send POST query -

wpf - Custom Message Box Advice -