2024/9/14
laprasdrum.icon ワンオペ
/icons/hr.icon
メモリリークと思われる現象の見分け方とその実践的な掘り下げ方がよくまとまってる。
whenever something is happening twice, it's a memory leak.
new から始まる属性を使ってる・使おうとしてるのなら注意。
ARCの制約に引っかかるらしい。
> To allow interoperation with manual retain-release code, ARC imposes a constraint on method naming:
> You cannot give an accessor a name that begins with new. This in turn means that you can’t, for example, declare a property whose name begins with new unless you specify a different getter:
Apparently, this is still relevant in 2024 for Core Data.
code:Sample.m
// Won't work:
@property NSString *newTitle;
// Works:
@property (getter=theNewTitle) NSString *newTitle;