Avoid Retain Cycles, NSNotificationCenter?
问题 Will this category method allow me to avoid additional retains on NSNotificationCenter observers? #import "NSNotificationCenter+Util.h" @implementation NSNotificationCenter (Util) - (void)addWeakObserver:(nonnull NSObject*)observer selector:(nonnull SEL)aSelector name:(nullable NSString *)aName object:(nullable id)anObject { __weak NSObject *weakObserver = observer; [self addObserver:weakObserver selector:aSelector name:aName object:anObject]; } @end The goal is to have the object die without