Page 1 of 1

Focus lost on dispose

Posted: Thu Mar 08, 2007 3:29 pm
by seesharp
Hi

I have the following (complicated) situation:

1. swf loaded: f_in_box__control flash holds my .swf
2. to load 2. .swf -->

Code: Select all

 
tmpFlash = flash; //save a new reference
flash = new f_in_box__control .... //create a new instance

disposeTimer.Start(); //start a timer to dispose the old instance

Now as soon as the dispose timer ticks, the tmpFlash is disposed.
Like this I can reload a f_in_box__control instance AND dispose the previous one. But, as soon as tmpFlash.Dispose() is called, my application looses focus. And if I use:

Code: Select all

tmpFlash.Dispose();
GC.Collect();
this.Activate();


The f_in_box__control isn't always disposed and memory usage increases by 8 MB each round.

Do you have any idea how to solve that issue ?

Best Regards

Alex

Posted: Fri Mar 09, 2007 8:40 am
by Softanics
Could you please send me a small project for testing to support (at) f-in-box.com ? I haven't ideas right now...

Posted: Fri Mar 09, 2007 8:46 am
by seesharp
Yes,

I'll prepare it asap. My solution concerning the ExternalInterface / AccessViolation problem might be 'strange' anyway but I couldn't find another yet.

Best regards

Alex