1.reference count
when a obj was created,it's RC is 1,the system will callback when RC = 0
know what is AMR & MRC model
release: RC - 1
retain: RC + 1
2.@property in ARM Manager
@property(retain) only the obj type
@property(assign) don't create the ARM Manager code (Basic Data Type)
@property(copy) --> NSString
3.Thread
nonatomic --> not safe
atomic --> safe
4.@property authority
readwrite:both setter & getter
readonly:just getter method
5.@property rename the 2 methods
(getter = "")
6.@class & import
A Class --> B Class in A import B
B Class --> A Class in B @class A
7.circular reference
when >2 objs start a circular reference:
when circular reference happens,the obj @porperty(,assign),we don't use the assign,replace with the assign
8.@autoreleasepool
[obj autorealse]
put the objs in
@autorelease{
}
it will auto realse in the end
Order:
outer --> inner
9.NSAutoreleasepool
allocate a NSAutoreleasepool and [pool release]
we can write the autorealse sentence in getter method
10.autorelease scene:
1.class method --> @autorealsepool
2.in getter method
11.ARC & MRC
we should't write the [super dealloc] in ARC model
__strong : strong indicator identification
__weak :weak indicator identification --> application scene : when circular reference happens,there must exist a weak indicator
12.intancetype
intancetype in OC ~ instance of in Java
Sum:
normally we use the ARC Model,so we will see the specific details in Real Project