Reduce the impact of leaking Editor, Selection, & Cursor objects #13523

Merged
merged 11 commits into from Jan 4, 2017

Projects

None yet

2 participants

@maxbrunsfeld
Contributor
maxbrunsfeld commented Dec 31, 2016 edited

It is pretty easy for 3rd party Atom packages to accidentally introduce memory leaks, causing destroyed TextEditor objects to be retained on the heap indefinitely. This PR updates editors and their sub-objects to do a more aggressive teardown when they are destroyed, so that leaking these objects will have a negligible impact on Atom's memory usage, even for large files.

See also atom/text-buffer#193

🍐'd with @nathansobo

maxbrunsfeld added some commits Dec 31, 2016
@maxbrunsfeld @nathansobo maxbrunsfeld Reduce the impact of leaking Editor, Selection, & Cursor objects
Signed-off-by: Nathan Sobo <nathan@github.com>
d0d187f
@maxbrunsfeld maxbrunsfeld ⬆️ text-buffer (prerelease)
11b19b8
@maxbrunsfeld maxbrunsfeld referenced this pull request in facebook/nuclide Dec 31, 2016
Closed

Memory leak due to CodeHighlightManager #953

maxbrunsfeld added some commits Jan 2, 2017
@maxbrunsfeld maxbrunsfeld Fix usages of destroyed buffers in specs f4371ef
@maxbrunsfeld maxbrunsfeld ⬆️ text-buffer (prerelease)
a7f390d
@maxbrunsfeld maxbrunsfeld Avoid using torn-down properties in specs
79e68b4
maxbrunsfeld added some commits Jan 3, 2017
@maxbrunsfeld @nathansobo maxbrunsfeld Don't throw exceptions when using editor APIs after destroying the ed…
…itor

Signed-off-by: Nathan Sobo <nathan@github.com>
6f13159
@maxbrunsfeld @nathansobo maxbrunsfeld ⬆️ text-buffer (prerelease)
Signed-off-by: Nathan Sobo <nathan@github.com>
8eb8285
@maxbrunsfeld maxbrunsfeld Emit editor destroyed event after releasing the editor's buffer
126f538
@maxbrunsfeld maxbrunsfeld ⬆️ find-and-replace, spell-check, whitespace
8277f69
@maxbrunsfeld maxbrunsfeld Merge branch 'master' into mb-ns-mitigate-leaks
d1a52b6
@maxbrunsfeld maxbrunsfeld ⬆️ text-buffer
7082e29
@maxbrunsfeld maxbrunsfeld merged commit d9de1c1 into master Jan 4, 2017

0 of 4 checks passed

ci/circleci CircleCI is running your tests
Details
continuous-integration/appveyor/branch Waiting for AppVeyor build to complete
Details
continuous-integration/travis-ci/pr The Travis CI build is in progress
Details
continuous-integration/travis-ci/push The Travis CI build is in progress
Details
@maxbrunsfeld maxbrunsfeld deleted the mb-ns-mitigate-leaks branch Jan 4, 2017
@nathansobo
Contributor

⚡️

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment