Page 1 of 1

Problems width Memory and GetVariable function

Posted: Wed Aug 10, 2005 12:34 am
by ooo
Helo,
I'am just starting to use the flashPlayerControl (Demo version). I have 2 problems:
1.- After Loading and playing a swf movie, the memory is growing up. It perhaps a problem of the ActiveX Control From MacroMedia.
Is there a Solution ?

2.- Everytime that I get a variable the function getVariable returns "", an empty string.

If somebody know something about this 2 problems, thanks.....

Re: Problems width Memory and GetVariable function

Posted: Fri Aug 12, 2005 6:26 pm
by Softanics
Thank you.

ooo wrote:1.- After Loading and playing a swf movie, the memory is growing up. It perhaps a problem of the ActiveX Control From MacroMedia.
Is there a Solution ?


This problem is related with Flash ActiveX, you can load your flash movie into Internet Explorer and you will see the memory problem. The solution was suggested by one of our customers:

Also, you may remember that I contacted you about memory usage issues, which have nothing to do with FPC, but the Flash player itself. I
have found a solution that seems to be working:

I am running the following code every ten seconds: (MFC/C++/Windows FPC DLL)

//---------------------------------------------------

pseudoHandle = GetCurrentProcess();

SetProcessWorkingSetSize(pseudoHandle, -1, -1);

//-------------------------------------------------

This seems to keep memory usage down a great deal, and hasn't caused any reported issues yet.


ooo wrote:2.- Everytime that I get a variable the function getVariable returns "", an empty string.


Yes, I have the same problems. Our developers will fix this bug on the next week.

Posted: Sun Aug 14, 2005 11:38 am
by Softanics
Problem with GetVariable fixed. Updated version is available for downloading.

Re: Problems width Memory and GetVariable function

Posted: Mon Aug 29, 2005 9:20 pm
by ooo
Thank you,

If works.........

I write the solution in C# if it can help somebody.

private Timer timer = new Timer();
// Todo in Constructor
this.timer.Enabled = true;
this.timer.Interval = 10000;
this.timer.Tick += new System.EventHandler(this.timer_Tick);

private void timer_Tick(object sender, System.EventArgs e)
{
Process pseudoHandle = Process.GetCurrentProcess();
SetProcessWorkingSetSize(pseudoHandle.Handle, -1, -1);
}

[System.Runtime.InteropServices.DllImport("Kernel32.dll")]
public static extern bool SetProcessWorkingSetSize(IntPtr handle, long a, long b);

Posted: Tue Aug 30, 2005 10:53 am
by Softanics
Thank you for the code!