Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Plugin#destroy() should remove listeners #2916

Closed
Reinmar opened this issue May 22, 2017 · 4 comments · Fixed by ckeditor/ckeditor5-core#87
Closed

Plugin#destroy() should remove listeners #2916

Reinmar opened this issue May 22, 2017 · 4 comments · Fixed by ckeditor/ckeditor5-core#87
Assignees
Labels
package:core type:improvement This issue reports a possible enhancement of an existing feature.
Milestone

Comments

@Reinmar
Copy link
Member

Reinmar commented May 22, 2017

The default implementation should call this.stopListening().

@Reinmar
Copy link
Member Author

Reinmar commented May 22, 2017

Part of #114.

@Reinmar
Copy link
Member Author

Reinmar commented May 23, 2017

Let's add a method destroy() to PluginCollection and Editor.destroy() should call this method before this:

			.then( () => {
				this.document.destroy();
				this.data.destroy();
			} );

@Reinmar
Copy link
Member Author

Reinmar commented May 23, 2017

Also, it will be interesting to see what happens with tests after this change.

@pomek
Copy link
Member

pomek commented May 29, 2017

I added default implementation for Plugin class, destroy() method for PluginCollection which calls destroy() method on each loaded plugin and Editor.destroy() calls this.plugins.destroy() as you wanted.

Everything works.

Reinmar referenced this issue in ckeditor/ckeditor5-core Jun 20, 2017
Feature: `Editor#destroy()` will destroy all loaded plugins. Closes #86.

Added default implementation for `Plugin#destroy()`. Introduced `PluginCollection#destroy()` method which calls `Plugin#destroy()` for every loaded plugin.
@mlewand mlewand transferred this issue from ckeditor/ckeditor5-core Oct 9, 2019
@mlewand mlewand added this to the iteration 11 milestone Oct 9, 2019
@mlewand mlewand added status:confirmed type:improvement This issue reports a possible enhancement of an existing feature. package:core labels Oct 9, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
package:core type:improvement This issue reports a possible enhancement of an existing feature.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants