问题
People like flash builder profile tool very much.But recently, a problem came to me when I tried to find a memory leak. Here is the simplified sample.
package
{
import flash.display.Sprite;
import flash.sampler.pauseSampling;
import flash.system.System;
import org.robotlegs.base.ContextBase;
import org.robotlegs.mvcs.Context;
public class MemoryLeak extends Sprite
{
public function MemoryLeak()
{
makeAndDrop();
}
public function makeAndDrop():void{
var _context : Context = new Context(this);
_context = null;
}
}
}
This is a simple class that create an object and then release it. When I use the profile perspective, it show me "live objects".



来源:https://stackoverflow.com/questions/14000712/fb-profile-says-it-is-a-gc-root-but-it-seems-wrong