Language: ChineseGermanSpanishFrenchDutchItalianRussian
123 Flash Chat Forums

Go Back   TOPCMM Community > SWFKit > SWFKit Support

Reply
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 06-09-2007, 08:40 AM
Member
 
Join Date: May 2007
Posts: 53
Default Flash player memory leaks

Everyone know, that FP leaks.
I wasted 4 days trying to get rid of memory loss.. And found out that this is impossible.
Also, i noticed that Zinc picks memory, lost by FP.
But your projector is much more efficient towards to CPU in transparent mode.
So, i want to ask, are you planning to make your own garbage collector ? When, if so?
__________________
#define true false //happy debugging, friends
Reply With Quote
  #2 (permalink)  
Old 06-09-2007, 12:59 PM
Senior Member
 
Join Date: Dec 2002
Posts: 2,015
Default Re:Flash player memory leaks

Please send us a sample(support@swfkit.com), thank you.
Reply With Quote
  #3 (permalink)  
Old 06-13-2007, 01:47 PM
Member
 
Join Date: May 2007
Posts: 53
Default Re:Flash player memory leaks

It have took two more days from me to find an exact memory leaks source. I think, it is here:
AS1 code
Code:
import flash.external.ExternalInterface;

this.onEnterFrame = function() {
var sum_1:Number = 0;
var sum_2:Number = 0;
for(i=0;i<100;i++) {
sum_1 += Number(ExternalInterface.call('TestTestTest'));
sum_2 += Number(ExternalInterface.call('TestTestTest'))*2;
}
sum_1 /= 100;
sum_2 /= 100;
_root['aaa'].text = sum_1 + ' ' + sum_2 + ' ' + Math.random();
};
SWFKit code:
Code:
//Initialize
function TestTestTest() {
return 1;
}

return true;
This sample leaks about 6.2 Mb per minute at 25 fps. I mean, calling any function via "ExternalInterface.call()" leaks.

Thx for your attention to this problem.
__________________
#define true false //happy debugging, friends
Reply With Quote
  #4 (permalink)  
Old 06-13-2007, 02:07 PM
Member
 
Join Date: May 2007
Posts: 53
Default Re:Flash player memory leaks

PS. If you are interesting about FP (VM1) leaks, i found this issue:
Code:
var a:NetConnection = ...;
a.connect(...);
a.call('...', a); a.onResult = function(infoObj:Object) {};
This sample leaks on multiple "a.call(...)" using (1000 times and more).
People say, much more issues exists, but im already tired hunting that leaks -)
__________________
#define true false //happy debugging, friends
Reply With Quote
  #5 (permalink)  
Old 06-13-2007, 10:46 PM
Member
 
Join Date: May 2007
Posts: 53
Default Re:Flash player memory leaks

Hello one more time.
Do you think the problem worth not discussing ?
Today i've run tens of tests. And i'm sure ExternalInterface.call(..) leaks. And FP garbage collector can't manage this. Please, tell, what do u think.

Thx in advance.
__________________
#define true false //happy debugging, friends
Reply With Quote
  #6 (permalink)  
Old 06-14-2007, 03:12 AM
Senior Member
 
Join Date: Dec 2002
Posts: 2,015
Default Re:Flash player memory leaks

We really appreciate your great work. We will work on it. Thank you very much.
Reply With Quote
  #7 (permalink)  
Old 06-18-2007, 12:16 PM
Senior Member
 
Join Date: Dec 2002
Posts: 2,015
Default Re:Flash player memory leaks

As what you have said, the memory leaks caused by ExternalInterface.call cannot be freed by the FP VM1 GC. Therefore, it is a bug of the flash player, and we can do nothing about it. Fortunately, the problem does not occur in actionscript 3.

There is a method to force garbage collection - minimizing/restoring the main window.
Reply With Quote
  #8 (permalink)  
Old 06-19-2007, 08:28 AM
Member
 
Join Date: May 2007
Posts: 53
Default Re:Flash player memory leaks

Thanks for checking this.
Anyway, while testing the problem i've found a solution for myself: i set flags and variables in AS2, and swfkit works with it using setInterval via FlashPlayer.get/setVariable. So i reduced leaks in my app from 250 to 1.5 Mb per 24 hours. :-)
Thanks for cooperation :-)
__________________
#define true false //happy debugging, friends
Reply With Quote
Reply

Was this information helpful?    Yes No



Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



All times are GMT. The time now is 04:21 AM.


Powered by vBulletin® Version 3.7.1
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.1.0 ©2007, Crawlability, Inc.