uno.extensions
uno.extensions copied to clipboard
[Navigation] ViewModels created by the Navigator are not disposed
Hi, I'm using Uno Platform with Uno Extensions for ViewModel navigation. I've noticed that when navigating away, the previous ViewModel isn't automatically disposed, potentially leaving resources unmanaged.
If a class implements IDisposable, it it the responsibility of the owner to Dispose instances of the class.
Originally posted by @Nurgo in https://github.com/unoplatform/uno.extensions/discussions/1602
I don't understand why this problem is marked as "priority/awaiting-more-evidence", it's a major problem. Each time you navigate to a new ViewModel, the previous one is not disposed, takes memory, and continues to receive events. This makes the application slower and slower, ending in a crash.
@nickrandolph maybe @eriklimakc can help take a look at this one ? (as he will be helping with the navigation documentation)