注:私の質問は、これとそれに対する回答を確認した後に基づいています。
一部のより大きなメソッドには、特定の期間のみ有効にしたいコードがあります。例:
1)UIを設定する大きな方法があります:UILabel's
サイズ、色、配置、UIView's
ジェスチャー認識など。上記を知っていれば、次のようなことをするのは理にかなっていますか:
- (void)setUI
{
//setting other UI elements
{
// Add the Swipe Gesture to the swipeUpView
UISwipeGestureRecognizer *swipeGestureUp = [[UISwipeGestureRecognizer alloc] initWithTarget:self action:@selector(animeViewWithSwipeGesture)];
swipeGestureUp.direction = UISwipeGestureRecognizerDirectionUp;
[_swipeUpView addGestureRecognizer:swipeGestureUp];
}
// setting other UI elements
}
- 上記の例に基づいて、これはアプリケーションのメモリ フットプリントを下げる有効な方法ですか?
- との関係はあります
@autoreleasepool{}
か?