A small memory issue

.NET Edition of the F-IN-BOX
seesharp
Posts: 82
Joined: Mon Oct 30, 2006 1:34 pm

A small memory issue

Postby seesharp » Thu Mar 01, 2007 11:25 am

Hi

To load various movies into f_in_box__control using ExternalInterface calls, we have to go a 'weird' way. We unload the FlashPlayer / f_in_box__control and reload it anew. This is to avoid Access Violations of the FlashPlayer.

Now, although I call Dispose on my f_in_box__control object, everytime I reload it I get 4MB additional Memory usage. No matter if I load an .swf or not.

Could you give me a hint how to avoid this increase ?

Best regards

Alex

Softanics
Site Admin
Posts: 1402
Joined: Sat Sep 18, 2004 3:03 am
Location: Russia, St. Petersburg
Contact:

Postby Softanics » Thu Mar 01, 2007 3:53 pm

Thank you for your question.

Please insert GC.Collect after Dispose. Does it help?
If not, please send me small project -- it would be great!
Best regards, Artem A. Razin,
F-IN-BOX support
Ask your question here: http://www.f-in-box.com/support.html

seesharp
Posts: 82
Joined: Mon Oct 30, 2006 1:34 pm

Postby seesharp » Thu Mar 01, 2007 3:59 pm

I'll try that.


Alex

seesharp
Posts: 82
Joined: Mon Oct 30, 2006 1:34 pm

Postby seesharp » Wed Mar 07, 2007 9:37 pm

Hmmm,

now my issue really needs your expertise.
I've added code to dispose the control and GC.Collect. This works fine concerning the memory issue.
Strange enough, without that code I am able to replace the control and the contained movie from within the control itself:
flash --> ExternalInterfaceCall to the form --> unload the f_in_box__control --> reinstantiate a control --> reload a new movie

as soon as I dispose the control, the whole code hangs. Obviously this must be related to some flow of messages. If I invoke the very same from another form it works.

Do you have any idea or possible solution as one of my customers would like to replace a movie in this way.

Alex

seesharp
Posts: 82
Joined: Mon Oct 30, 2006 1:34 pm

Postby seesharp » Thu Mar 08, 2007 2:17 pm

Found a work-around for that issue:

I pass the reference to the current f_in_box__control to another variable and dispose it triggered by a timer and not directly by the method called from Flash (I guess the situation is quite difficult to understand)

Regards

Alex


Return to “.NET Edition”

Who is online

Users browsing this forum: No registered users and 22 guests

cron