On 2007-12-10, at 17:50 EST, André Bargull wrote:

Not approved.

I get the same error as reported at LPP-5173. But after I've removed the call to LzSprite#destroy(..) in LzReplicationManager#destroyClone(..), the error was gone. So, why do we call directly LzSprite#destroy(..) at that place?

I'm guessing superstition. There was nothing like that in 3.4, destroyClone was just an alias for destroy. I say we remove that.

Notes:
- with this change, you can revert my changes for LPP-4879 regarding updatePlayDel/doQueuedDel in LzSprite#predestroy resp. #destroy (SWF)

Ok, I will put them back. Not clear that pre-destroy is needed either, but I don't know for sure.

- the current implementation will be quite inefficient for DHTML, because in DHTML we still recusre in LzSprite#destroy...!

I meant to remove that. It should not be necessary now, for the same reason it is not necessary in SWF. I will try taking that out and see if Phil's 100 window test makes DHTML grow or not...

On 12/10/2007 2:00 PM, P T Withington wrote:
Change 20071209-ptw-k by [EMAIL PROTECTED] on 2007-12-09 09:32:18 EST
   in /Users/ptw/OpenLaszlo/ringding-2
   for http://svn.openlaszlo.org/openlaszlo/trunk

Summary: Fix Sprite memory Leaks

Bugs Fixed:
LPP-5217 'windows can leak memory

Technical Reviewer: [EMAIL PROTECTED] (pending)
QA Reviewer: [EMAIL PROTECTED] (pending)
Doc Reviewer: (pending)

Details:
   LzSprite.*:  In #destroy set __LZdeleted flag to prevent events
   from resurrecting you.  No need for recursive sprite destruction
   now.

   LzIdle: Be careful to create coi Array on instance, not prototype.

   LzNode: Add comment to explain importance of __LzDeleted flag.

   LaszloView: Destroy the sprite _before_ you check for a recursive
   call.

   newcontent, scrollingtext: Remove unused id (that causes a leak).

Tests:
   I modified Phil's test case to only create/destroy 1 window per
   click.  The test methodology is:

   1. Start test
   2. Click twice to create any shared substrate
   3. Debug.markObjects()
   4. Click once
   5. Debug.findNewObjects()
   6. Debug.whyAlive()

Result: Before change, many leaked window sprites. After change, no
   leaked window sprites.

   NOTE: There are still some other minor leaks that I have not
   attempted to address here, but will report as a separate bug.

Files:
M      WEB-INF/lps/lfc/kernel/swf/LzSprite.as
M      WEB-INF/lps/lfc/kernel/dhtml/LzSprite.js
M      WEB-INF/lps/lfc/kernel/dhtml/LzInputTextSprite.js
M      WEB-INF/lps/lfc/kernel/swf9/LzSprite.lzs
M      WEB-INF/lps/lfc/services/LzIdle.lzs
M      WEB-INF/lps/lfc/core/LzNode.lzs
M      WEB-INF/lps/lfc/views/LaszloView.lzs
M      lps/components/debugger/newcontent.lzx
M      lps/components/debugger/scrollingtext.lzx

Changeset: http://svn.openlaszlo.org/openlaszlo/patches/20071209-ptw-k.tar




Reply via email to