Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
私は.hにあります:
@property (nonatomic,retain) NSString *myString;
.mで:
@synthesize myString; myString =@"Test";
それをdeallocでリリースする必要がありますか? [myStringリリース]が原因でアプリがクラッシュすることがあるので、理由がわかりませんか?
プロパティが「retain」属性で定義されている限り、deallocで解放する必要があります。
最新のObjectiveCのARC(自動参照カウント)にはガベージコレクションが組み込まれているため、リリースと保持は不要になりました。