mobx-preact icon indicating copy to clipboard operation
mobx-preact copied to clipboard

Memory leak with observer

Open jsaunderson opened this issue 7 years ago • 1 comments

There is a memory leak when using an observer, this appears to be caused by mixinLifecycleEvents not patching componentWillUnmount resulting in the reaction never being disposed.

After adding patch(target, 'componentWillUnmount'); the memory leak went away.

Is there any reason it was omitted, or can it be added in?

jsaunderson avatar Nov 21 '18 23:11 jsaunderson

@jsaunderson Looks like that is missing indeed! Feel free to open PR

mweststrate avatar Dec 18 '18 13:12 mweststrate