tinymce-angular
tinymce-angular copied to clipboard
Editor Component Memory leak
What is the current behavior? The Editor component is still kept in memory whereas i changed paged from my angular app. I tried to use remove function tinymce and set global settings to null but nothing that i tried can remove editor component from the memory.
Please provide the steps to reproduce and if possible a minimal demo of the problem via codesandbox.io or similar.
What is the expected behavior? The memory should destroy the editor component
Which versions of TinyMCE/TinyMCE-Angular, and which browser / OS are affected by this issue? Did this work in previous versions of TinyMCE or TinyMCE-Angular?
[email protected]
In this closed issue it was said it was a resolved issue but why then i got memory leak from this component https://github.com/tinymce/tinymce-angular/issues/90 ?
Ref: INT-2782
I have the same problem Issue90
There's no memory leak in @tinymce/tinymce-angular
. There has been a memory leak in Angular itself which was fixed in this commit https://github.com/angular/angular/commit/990067a0c6df8e97c5bbffec00a76f13c4d4c903 and shipped in Angular 14.
I just checked with the latest Angular:
@Component({
selector: 'app-root',
template: `
<editor
[init]="{
height: 500,
menubar: false,
plugins: [],
toolbar:
'undo redo | formatselect | bold italic backcolor | alignleft aligncenter alignright alignjustify | bullist numlist outdent indent | removeformat | help'
}"
></editor>
<button (click)="appRef.destroy()">destroy</button>
`,
standalone: true,
imports: [EditorModule],
})
export class AppComponent {
constructor(readonly appRef: ApplicationRef) {}
}