-
-
Notifications
You must be signed in to change notification settings - Fork 150
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
IStateSelection memory leak (BindingFlags.FlattenHierarchy?) #353
Comments
Ah yes, I see the problem. I think the correct fix is to remove If you fancy submitting a PR into https://github.com/mrpmorris/Fluxor/tree/release/5.6 I'll gladly accept it. |
I will do but i am currently unsure if this line really IS the problem. I am gonna check out and investigate. For the moment I've setup a reproduction project (https://github.com/naice/FluxorMemoryLeak) if you switch between "Counter" and "Fetch data" and observe the console output (Browser) you can see instances stacking... (while clicking on UPDATE COUNT) Edit: I have changed that method accordingly but that didnt fixed the issue. |
Have you had time yet to look into my sample? |
Not yet, sorry |
Fixed in 5.6, thank you for letting me know and for creating the repo! |
Hi,
I've found out that if you not derive directly from FluxorComponent (i have a base component public class LocalizedFluxorComponent : FluxorComponent) a injected IStateSelection creates a memory leak.
I haven't had time yet to dig entirely into the code but I am assuming thats a problem with reflection. But i guess that line
Fluxor/Source/Lib/Fluxor/StateSubscriber.cs
Line 64 in 392907b
might be the problem. So I was asking myself why won't you use BindingFlags.FlattenHierarchy to get all properties?
The text was updated successfully, but these errors were encountered: