eiriklv / react-masonry-component

A React.js component for using @desandro's Masonry
MIT License
1.44k stars 145 forks source link

cleanup masonry when unmounted to prevent memory leak #34

Closed madsleejensen closed 8 years ago

madsleejensen commented 8 years ago

GC seems to be unable to free masonry item nodes, if destroy() is not called when React component is unmounted, resulting in a memory leak.

afram commented 8 years ago

Good catch @madsleejensen, thanks for the contribution! :-)

merging this in now and will release asap.