Further reading
- Weak references: https://www.youtube.com/watch?v=2WcDhh8lvJs
ComWrappers
class: https://docs.microsoft.com/ dotnet/api/system.runtime.interopservices.comwrappers?view=net-5.0- Marshal.ReleaseComObject Considered Dangerous: https://devblogs.microsoft.com/visualstudio/marshal-releasecomobject-considered-dangerous/
- WeakEventManager Class: https://docs.microsoft.com /dotnet/api/system.windows.weakeventmanager?view=net-5.0
- Weak Event Patterns: https://docs.microsoft.com/en-us/dotnet/desktop/wpf/advanced/weak-event-patterns?view=netframeworkdesktop-4.8
- How to properly release Excel COM objects: https://www.add-in-express.com/creating-addins-blog/2013/11/05/release-excel-com-objects/
- Understanding and Avoiding Memory Leaks with Event Handlers and Event Aggregators: https://www.markheath.net/post/understanding-and-avoiding-memory-leaks
- Why and how to avoid event handler memory leaks: https://stackoverflow.com/questions/4526829/why-and-how-to...