跟 Objective-C還有 Cocoa很不熟, Cocoa Design Patterns還真是開了我的眼界。

可是 Singleton的 code不能用了。

原來是因為 [super alloc]會叫到 [self allocWithZone:]。文中提到的辦法是改叫 [super allocWithZone:nil]來閃過,總覺得不是那麼直觀,不過也只好將就用用先。

P.s. 還好沒看中文版,那句 One pattern to rule them all的味道沒了XD。