我創建約100 uibuttons
,每個人都有一個獨特的圖像(圖像是一些60x70 PNG圖像)。我有一個內存問題。我想在某一時刻釋放此內存,在點我已經完成使用這個按鈕。UIButton內存
我這樣設置圖像。
[button1 setImage:imageButton1 forState:UIControlStateNormal];
其中
button1=[UIButton buttonWithType:UIButtonTypeCustom];
現在我所試圖做的是設置使用的uibuttons爲零的圖片如下。
[button1 setImage:nil forState:UIControlStateNormal];
但是這樣,內存保持不變。
使用ARC進行內存管理? –
可能沒有泄漏,只有緩存的圖像。閱讀http://stackoverflow.com/a/6500753/104790 –
是的,我用弧。@ juster – theone