What exactly is the difference between retain and copy? what is its significance on reference counting?
I know that when an object is allocated using alloc/retain, reference count goes up by one. so how about using copy?
Another question relating to this is, the difference between using
@property(nonatomic, retain) and @property(nonatomic,copy)?
retain -- is done on the created object, it just increase the reference count.
copy -- create a new object
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With