[Laszlo-dev] For Review: Change 20090522-maxcarlson-9 Summary: Fix IE memory leaks in drawview

André Bargull andre.bargull at udo.edu
Sat May 23 09:14:27 PDT 2009


I think there are two potential issues:
- __LZcanvas may not be defined when destroy() is called, resulting in a 
nullpointer exception
- the entry in LzSprite.prototype.__sprites needs to be removed in 
destroy(), otherwise destroy() may be called two times: if destroy() is 
called dynamically at runtime and for onbeforeunload.

On 5/23/2009 12:25 PM, André Bargull wrote:
> If "getContext" leaks memory on the excanvas object, don't you also 
> need to delete that property in "_buildcanvas()"?
>
>
> On 5/23/2009 1:22 AM, Max Carlson wrote:
>> Change 20090522-maxcarlson-9 by maxcarlson at Bank on 2009-05-22 
>> 16:17:48 PDT
>>     in /Users/maxcarlson/openlaszlo/trunk-clean
>>     for http://svn.openlaszlo.org/openlaszlo/trunk
>>
>> Summary: Fix IE memory leaks in drawview
>>
>> Bugs Fixed: LPP-7939 - Huge memory leak in IE7 on each reload of the app
>>
>> Technical Reviewer: hminsky
>> QA Reviewer: mdemmon
>>
>> Details: Tucker fund an updated memory leak checker that pinpointed a 
>> couple of properties in drawview (one in excanvas) that were causing 
>> apps to leak.
>>
>> Implemented destroy() to clean up after the canvas, added instance to 
>> LzSprite.prototype.__sprites hash so IE cleans up onbeforeunload - 
>> see LzSprite.js for more.
>>
>> Tests: test/extensions/drawing.lzx?lzr=dhtml&lzt=html (and webtop) 
>> show no leaks with the leak detector from M$, found at 
>> http://blogs.msdn.com/gpde/pages/javascript-memory-leak-detector.aspx
>>
>> Files:
>> M      lps/components/extensions/drawview.lzx
>>
>> Changeset: 
>> http://svn.openlaszlo.org/openlaszlo/patches/20090522-maxcarlson-9.tar
>>
>


More information about the Laszlo-dev mailing list