¡@

Home 

2014/10/15 ¤U¤È 10:14:11

iphone Programming Glossary: shouldlogdealloc

Repeating NSTimer, weak reference, owning reference or iVar?

http://stackoverflow.com/questions/4945028/repeating-nstimer-weak-reference-owning-reference-or-ivar

ti weakTarget id target selector SEL selector userInfo id userInfo repeats BOOL shouldRepeat logsDeallocation BOOL shouldLogDealloc @end NSTimer D12WeakTimerTarget.m #import NSTimer D12WeakTimerTarget.h @interface D12WeakTimerTarget NSObject __weak id.. purposes BOOL logging NSString targetDescription id initWithTarget id target selector SEL aSelector shouldLog BOOL shouldLogDealloc void passthroughFiredTimer NSTimer aTimer void dumbCallbackTimer NSTimer aTimer @end @implementation D12WeakTimerTarget.. aTimer @end @implementation D12WeakTimerTarget id initWithTarget id target selector SEL aSelector shouldLog BOOL shouldLogDealloc self super init if self return nil logging shouldLogDealloc if logging targetDescription target description copy weakTarget..