angular-ui / ui-tinymce

AngularUI wrapper for TinyMCE
MIT License
488 stars 371 forks source link

Memory leaks after destroying tinymce #191

Closed arjunasuresh3 closed 8 years ago

arjunasuresh3 commented 8 years ago

I see memory leak after destorying.

Has anybody have fixes for same?

Code creating memory leaks: https://github.com/angular-ui/ui-tinymce/blob/10870200f2f16079c267d12333f78a4f9bb15d97/src/tinymce.js#L61-L101

Plunker: http://plnkr.co/edit/ykjMMuYyj4WaMHntSVFT?p=preview

detacheddom

arjunasuresh3 commented 8 years ago

Timeline for same, where nodes are not releasing completely.

tinymce_timeline

deeg commented 8 years ago

Thanks for reporting, I will take a look into this.

Feel free to open a pull request (against dev branch) if you already have a working fix that we could pull in.

deeg commented 8 years ago

After looking closer at the timeline and running a few myself, I do not really see a memory leak.

The values for nodes and heap seem to be going back to the correct number once the garbage collection runs. Could you explain a bit more about where you see the memory leak from the timeline?

Also it seems like all the correct things are being done to prevent the memory leaks:

deeg commented 8 years ago

Closing this due to inactivity. @arjunasuresh3, I'm happy to discuss more, so please respond to closed comment if you want to chat about it.

If after discussing, we agree there is actually an issue, I can re-open this.