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

memory leak upon destroy #87

Closed
arshaw opened this issue Dec 22, 2015 · 4 comments
Closed

memory leak upon destroy #87

arshaw opened this issue Dec 22, 2015 · 4 comments
Milestone

Comments

@arshaw
Copy link
Member

arshaw commented Dec 22, 2015

reported by Kieren Grant:


Been playing around with some scheduler demos and noticed this:

https://output.jsbin.com/nupisayule

Reproducing in 2.5.0 + scheduler 1.1.0 for any calendar with attached
resources. Destroying + rebuilding the calendar should free
all the resources (and it does work perfectly when it's filled
just with events alone).

However, if there's any resources present, you can notice the huge amount
of retainers - orphaned DOM elements etc. The number rapidly increases
with each cycle.

I've fixed the library to prevent this, but not in the most efficient
way I'm afraid. Seeing a performance drop after the fix.

@grantkieren
Copy link

Here's two more bins to illustrate it:

1: timelineDay, no resources: http://jsbin.com/gukosewalu/1/edit?js,output
2: timelineDay, with resources: http://jsbin.com/cazoqucafa/1/edit?js,output

Take an initial heap snapshot and another one after 20-30 cycles of destroy+init.
If you compare them, the 1st bin shows no detached dom objects, the 2nd
one ends up with 5k+ orphaned divs.

@grantkieren
Copy link

Manual unbinding of dragstart & sortstart after calling 'destroy' fixes the leak.

@arshaw
Copy link
Member Author

arshaw commented May 30, 2016

i can confirm that dragstart/sortstart are not getting unbound. thank you

@arshaw arshaw added this to the v1.3.2 milestone Jun 2, 2016
@arshaw
Copy link
Member Author

arshaw commented Jun 2, 2016

fix release in v1.3.2

@arshaw arshaw closed this as completed Jun 2, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants