Closed ashah888 closed 6 months ago
It will live on memory until closure that references it alive. But you should n't handle this case especially, it just will be assigned to a new value (when the promise is resolved), after this - it will be collected in the next gc cycle
Yeah it should be GC'd w/out issue -- if you find anything to the contrary, then we can take a look.
I'm using useSignal() for the first time and I want to use it to store data from the server.
In this code and example, will the signal data be data collected or should I do something else to properly handle the unmount?
In this code, if the user navigates away from the page and "unmounts" this component before the API request finishes, will "abc" signal be properly garbage collected? Or will it live in memory until I do something about it?