Issue #627 Extreme memory usage with large blocks of text#779
Merged
Jugen merged 1 commit intoFXMisc:masterfrom Nov 4, 2018
Merged
Conversation
Fix memory leak of ParagraphText through listeners: - Make listeners static class - Use WeakReference to refer to the ParagraphText from the listeners - Remove the listeners if the ParagraphText is garbage collected.
Collaborator
|
Thanks for this @JonathanMarchand |
JFormDesigner
pushed a commit
to JFormDesigner/RichTextFX
that referenced
this pull request
Dec 15, 2018
…ret on dispose instead of waiting for GC (this improves PR FXMisc#779, issue FXMisc#627) without this change, disposed ParagraphText objects still listen to selection and caret and do some useless stuff
Jugen
pushed a commit
that referenced
this pull request
Dec 16, 2018
…s on disposal (#791) * ParagraphText: immediately remove listeners from SelectionPath and Caret on dispose instead of waiting for GC (this improves PR #779, issue #627) * ParagraphText: since weak listeners are no longer required for selection and caret listeners, remove listener classes again and move listener code to constructor (saves 100 lines of code) * ParagraphText: MapChangeListener.Change.wasAdded() and wasRemoved() may both return true when replacing an item. So check both and handle wasRemoved() before wasAdded(). * Fixed (rare) NPE in class ParagraphText when GC frees object between two WeakReference.get() invocations
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Resolves #627
Fix memory leak of ParagraphText through listeners: