facebookexperimental/Recoil

Memory leak when using atomFamily/selectorFamily

Open

#366 建立於 2020年6月19日

在 GitHub 查看
 (22 留言) (13 反應) (1 負責人)JavaScript (19,428 star) (1,151 fork)batch import
help wantedperformance

描述

Hello there,

The resources created by atomFamily and selectorFamily are not being properly freed when the specific key changes or if the component using the related RecoilState<T> unmounts.

Since I believe that memory management isn't properly implemented yet, both utils should be marked as _UNSAFE.

https://codesandbox.io/s/cranky-booth-penix?file=/src/App.js

貢獻者指南