flashplayer-debug

FB Profile says “it is a gc root”, but it seems wrong?

感情迁移 提交于 2019-12-22 17:38:56
问题 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);

FB Profile says “it is a gc root”, but it seems wrong?

痞子三分冷 提交于 2019-12-06 09:05:36
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