|
|||
|
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 |
|
|||
|
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();
};
Code:
//Initialize
function TestTestTest() {
return 1;
}
return true;
Thx for your attention to this problem.
__________________
#define true false //happy debugging, friends |
|
|||
|
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) {};
People say, much more issues exists, but im already tired hunting that leaks -)
__________________
#define true false //happy debugging, friends |
|
|||
|
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 |
|
|||
|
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. |
|
|||
|
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 |
![]() |
Was this information helpful? Yes No
| Thread Tools | |
| Display Modes | |
|
|