Skip to content

Fix #720 GC issue - No weak ref found - #744

Merged
petekanev merged 2 commits into
releasefrom
pete/fix-gc-issue-no-weakref
Apr 24, 2017
Merged

petekanev merged 2 commits into
releasefrom
pete/fix-gc-issue-no-weakref

Conversation

@petekanev

@petekanev petekanev commented Apr 19, 2017 •

Copy link
Copy Markdown
Contributor

The proposed changes address the problem described in issue #720 - having the GC trigger during navigation can sometimes collect children of composite views, before recursively iterating over said children. That could happen if real Java objects were considered unreachable, while their JS counterparts were still accessible as elements of view's children (js array) property, or vice versa. (Best explained in mslavcher's blog - https://iobservable.net/blog/2014/06/07/synchronizing-gc-in-java-and-v8/)

As an additional step now, during GC, array objects marked for collection will be iterated over to check whether references are reachable in JavaScript, in which case their Java proxies shouldn't be released.

Implementation considerations: Depending on the application, this modification can impose a slight performance hit where huge arrays are used inside implementation objects (extending classes and implementing interfaces)

@petekanev
petekanev requested a review from Plamen5kov April 19, 2017 11:03
@ns-bot

ns-bot commented Apr 19, 2017

Copy link
Copy Markdown

💔

@petekanev

Copy link
Copy Markdown
Contributor Author

run ci

@ns-bot

ns-bot commented Apr 19, 2017

Copy link
Copy Markdown

💚

@petekanev
petekanev force-pushed the pete/fix-gc-issue-no-weakref branch from 979ed58 to 21c8834 Compare April 24, 2017 10:17
@ns-bot

ns-bot commented Apr 24, 2017

Copy link
Copy Markdown

💚

@petekanev
petekanev merged commit 350090c into release Apr 24, 2017
@petekanev
petekanev deleted the pete/fix-gc-issue-no-weakref branch April 24, 2017 11:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants