ガベージコレクションのために、クラスのプリミティブ型(uint、string、Numberなど)をnullに設定する必要はありません。ActionScript - メモリ管理のプリミティブオブジェクトと非プリミティブオブジェクトの違い
例えば、私は次のクラスでは、このdispose()
方法を記述するために必要なわけではない:これが本当であれば
package
{
//Imports
import flash.display.Shape;
//Class
public class DrawSquare extends Shape
{
//Properties
private var squareColorProperty:uint;
//Constructor
public function DrawSquare(squareColor:uint)
{
squareColorProperty = squareColor;
init();
}
//Initialize
private function init():void
{
graphics.beginFill(shapeColorProperty);
graphics.drawRect(0, 0, 200, 200);
graphics.endFill();
}
//Dispose
public function dispose():void
{
squareColorProperty = null;
}
//Get Shape Color
public function get squareColor():uint;
{
return squareColorProperty;
}
}
}
、私はそれがあると信じている、プリミティブ型のオブジェクトとオブジェクトの違いは何ですかメモリ割り当てに関する非プリミティブ型の
GCAtomic.pptへのリンクは既に破損していますが、誰かがSlideshare経由で利用できるように見えます。http://www.slideshare.net/bufanliu/gc-atomic –