WPF memory leaks in navigation context
See original GitHub issueHello.
If WPF MapControl is located in a navigation context (i.e. Page within a Frame or UserControl in ContentControl) and user navigates back and forth between UserControls, the Controls that contain MapControl are not getting disposed of which leads to a memory leak. This happens even if I use the master branch. Quick memory debugging showed that it is related to TimerCallback - possibly relates to https://github.com/Mapsui/Mapsui/issues/1395 . What do you think of making the WPF MapControl IDisposable?
Issue Analytics
- State:
- Created 2 years ago
- Reactions:1
- Comments:6 (2 by maintainers)
Top Results From Across the Web
Do I have a memory leak in my WPF Navigation?
Yes, according to what you've provided, you have a memory leak. When you found the references chain, and it's not in your code, ......
Read more >Free memory when your app moves to the background
This article shows you how to reduce memory when your app moves to the background.
Read more >A memory leak in GridControl when there is a binding ...
A memory leak in GridControl when there is a binding in the context menu ... Control + related data is hold in memory...
Read more >Fighting Common WPF Memory Leaks with dotMemory
In this blog post, we'll see how dotMemory can help detect these common WPF memory leaks and how we can fix them. Here...
Read more >Understanding memory leaks
Memory leaks in this context occur when dynamically allocated memory is not properly deallocated or released when it is no longer needed. #include...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found

@ondrasvoboda The automatic counting did not work for me, but since the
Disposemethod was madepublic, I decided to callDisposemanually. After that the leak was gone.This has been fixed.