You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@royale.apache.org by GitBox <gi...@apache.org> on 2021/01/03 14:16:37 UTC

[GitHub] [royale-asjs] estanglerbm opened a new pull request #1030: Add method finalizeThis() to IViewCursor, and fix memory leak in MX ADG due to event listener leak

estanglerbm opened a new pull request #1030:
URL: https://github.com/apache/royale-asjs/pull/1030


   Add method finalizeThis() to IViewCursor, and fix memory leak in MX ADG due to event listener leak, due to lack of weak references in JS.
   
   In Flex, these cursors had addEventListener() with the 5th arg = true for a weak reference (because, in MX ADG, the cursor listens to its view, which then gets a reference to the cursor, and the view is longer-lived).  In JS, the reference is no longer weak, and the event listener references (to the cursors) are being kept around as the item renderers are removed and recreated on dataProviderChange events.  This adds up to a significant memory leak over time and excessive listeners.
   
   I don't know what the general strategy is for calling removeEventListener() on such items, so I added finalizeThis() to the interface (MX IViewCursor) and made sure, at least for MX ADG, that it is called during destruction of each cursor.
   
   (There are other event listener leaks going on in MX ADG.  This was the biggest one.)


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [royale-asjs] Harbs merged pull request #1030: Add method finalizeThis() to IViewCursor, and fix memory leak in MX ADG due to event listener leak

Posted by GitBox <gi...@apache.org>.
Harbs merged pull request #1030:
URL: https://github.com/apache/royale-asjs/pull/1030


   


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org