Garbage collection question

Hi all,

Today I found it very strange that even I use the popular “LocalConnection” hack, the memory is still not released AT ONCE! (It’s hold for 2-5 seconds)

I even put the hack code in a “EnterFrame” event handler like this:

[COLOR=“Red”]FYI: My FPS is set at 30 and a FPS counter told me everything works fine, the CPU usage is also very low.[/COLOR]

public function enterFrameHandler(event:Event):void {
  // Force GC
  try { 
    var lc1:LocalConnection = new LocalConnection(); 
    var lc2:LocalConnection = new LocalConnection(); 
    lc1.connect('name'); 
    lc2.connect('name2'); 
  } catch (error:Error)  { 
}

With such a tough push, the flashplayer still holds its memory load for 2-5 seconds before releasing!

So… is there any rule or hacks beyond the “LocalConnection” hack? Any suggestion for me?

Thanks very much