Memory leak found in flash player active-x 'CallFunction' method.
- November 9, 2009
- 2 replies
- 2938 views
Hello,
I think I found a memory leak that results from calling the flash player active-X object's method 'CallFunction'. Each time this method is called it seems that memory is not properly freed.
I'm attaching here a simple program I've made with C# that uses the shockwave flash object to load a SWF and continuously perform calls to it using the 'CallFunction'. It also displays the process memory so you can see how it's being increased after some time running.
In the zip file, under the bin/release directory, you'll find the compiled executable and both the test SWF (CallFunctionTest.swf) and its source (AS3 file) which is just a dummy Sprite that exposes a callable method using the ExternalInterface. The SWF has been compiled using Flex compiler (Version 3.3.0 build 4852).
The leak may become more visible after some hours running. Also, it's interesting to note that even by reloading the SWF without closing the application (by stopping and restarting the stress in my test application) the memory is not freed.
As a reference, in my computer (Intel Dual core E2180 @ 2Ghz) the test application's virtual memory (VM64) increased from 192MB to 480MB in 4 hours. In Windows XP 32-bit when this value reaches 2GB the process runs out of memory and the application crashes.
Does anyone experienced the same problem?
I have Flash Player version 10,0,32,18 installed.
Thanks,
Joan
