objective c - will auto synthesize with @property(copy) NSString *string do auto copy? -


say if have property arc , auto-synthesize:

@interface a: nsobject @property (nonatomic, copy) nsstring *name; @end 

now when using property, copy automatically, or have manual copy?

like

a *a = [a new]; nsstring *str = @"hello"; a.name = str; // or a.name = [str copy]? 

marking property copy work mutable instances.
don't need copy immutable instances (like nsstring).


Comments

Popular posts from this blog

apache - PHP Soap issue while content length is larger -

asynchronous - Python asyncio task got bad yield -

javascript - Complete OpenIDConnect auth when requesting via Ajax -