[vislib/tilemap] ensure listeners are cleaned up#8439
Merged
spalger merged 1 commit intoelastic:masterfrom Sep 23, 2016
Merged
Conversation
With the new "rendered" event, the listener added in the handler was not being cleaned up. This changes it to use the handler's `binder`, which will cleanup the listener when `handler.destroy()` is called.
thomasneirynck
approved these changes
Sep 22, 2016
| render() { | ||
| const self = this; | ||
| const charts = this.charts = []; | ||
| const { binder, charts = [] } = this; |
Contributor
There was a problem hiding this comment.
fwiw, you can trim the code down by removing these temporary references and just access these from the self var. That also has the added advantage that it's clear we're manipulating instance state. you coudl also remove these temporary copies altogether by changing the each-handler to an annonymous function.
Contributor
|
LGTM |
spalger
pushed a commit
to spalger/kibana
that referenced
this pull request
Sep 30, 2016
[vislib/tilemap] ensure listeners are cleaned up With the new "rendered" event, the listener added in the handler was not being cleaned up. This changes it to use the handler's `binder`, which will cleanup the listener when `handler.destroy()` is called.
spalger
pushed a commit
to spalger/kibana
that referenced
this pull request
Sep 30, 2016
[vislib/tilemap] ensure listeners are cleaned up With the new "rendered" event, the listener added in the handler was not being cleaned up. This changes it to use the handler's `binder`, which will cleanup the listener when `handler.destroy()` is called.
airow
pushed a commit
to airow/kibana
that referenced
this pull request
Feb 16, 2017
[vislib/tilemap] ensure listeners are cleaned up With the new "rendered" event, the listener added in the handler was not being cleaned up. This changes it to use the handler's `binder`, which will cleanup the listener when `handler.destroy()` is called. Former-commit-id: 6409182
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.
Fixes a failing functional test.
With the new "rendered" event, the listener added in the handler was not being cleaned up. This changes it to use the handler's
binder, which will cleanup the listener whenhandler.destroy()is called.