You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
My ObserableObject utilizes the WeakEventManager that is part of MAUI, in the same way that the ObserableObject in Xamarin Community Toolkit did, which this library is a replacement for. The ObserableObject in MVVM Community Toolkit have no dependence on MAUI and therefore uses the PropertyChangingEventHandler that can lead to memory leaks in some scenarios when events are not unsubscribed.
As much as possible I want to avoid dependencies on other libraries and if copied from the MVVM Community Toolkit, I still need to monitor/update that implementation.
I am a big fan of the MVVM Community Toolkit and use it in all my applications, but in this specific case I think I have a good reason to not use it. 😄
I really appreciate the input and that you take the time to make this a better library! 👍
Aah, I never used WeakEventManager and was not aware of the memory leaks - I'm using WeakReferenceMessenger (without a dependency on maui) but I guess WeakEventManager has a different purpose for you?
I see you added
ObservableObject
which is also available from the MVVM Community Toolkit.Reusing the class from that library would allow to maintain less code yourself.
The text was updated successfully, but these errors were encountered: