
|
If you were logged in you would be able to see more operations.
|
|
|
OpenLaszlo
Created: 07/Dec/07 09:54 AM
Updated: 08/Dec/07 02:57 AM
|
|
| Component/s: |
LFC - Object System
|
| Affects Version/s: |
RingDing (4.1)
|
| Fix Version/s: |
None
|
|
|
Environment:
|
swf and dhtml.
|
|
| Severity: |
Blocker
|
| Runtime: |
N/A
|
| Fix in hand: |
False
|
|
I simplified a recent problem into a simple app that shows a memory leak. In the following example, if you remove the <class> tag the leak goes away. There are several small leaks that I will post as a separate jira task.
On my system I see heap leakage of 15-20 megs for creating 100 windows.
<canvas>
<!-- Note: I'm not even instantiating myWindow -->
<!-- Remove this line to stop the leak -->
<class name="myWindow" extends="window"/>
<view>
<simplelayout axis="x" spacing="10"/>
<button text="Open/Close windows (leaks)" >
<attribute name="counter" type="number" value="0"/>
<method name="test">
var win = new lz.window(canvas,{title:'new', resizable:true, closeable:true});
win.open();
win.close();
win.destroy();
delete win;
</method>
<handler name="onclick">
<![CDATA[
for (var i = 0; i < 100; i++) {
this.test();
this.counter++;
Debug.write(this.counter);
}
]]>
</handler>
</button>
</view>
</canvas>
|
|
Description
|
I simplified a recent problem into a simple app that shows a memory leak. In the following example, if you remove the <class> tag the leak goes away. There are several small leaks that I will post as a separate jira task.
On my system I see heap leakage of 15-20 megs for creating 100 windows.
<canvas>
<!-- Note: I'm not even instantiating myWindow -->
<!-- Remove this line to stop the leak -->
<class name="myWindow" extends="window"/>
<view>
<simplelayout axis="x" spacing="10"/>
<button text="Open/Close windows (leaks)" >
<attribute name="counter" type="number" value="0"/>
<method name="test">
var win = new lz.window(canvas,{title:'new', resizable:true, closeable:true});
win.open();
win.close();
win.destroy();
delete win;
</method>
<handler name="onclick">
<![CDATA[
for (var i = 0; i < 100; i++) {
this.test();
this.counter++;
Debug.write(this.counter);
}
]]>
</handler>
</button>
</view>
</canvas>
|
Show » |
|
ERROR @lpp-5213.lzx#14: call to undefined method 'window'
ERROR @lpp-5213.lzx#15: undefined object does not have a property 'open'
ERROR @lpp-5213.lzx#16: undefined object does not have a property 'close'
ERROR @lpp-5213.lzx#17: undefined object does not have a property 'destroy'