Search for memory leaks in a Win8 metro managed application?

I am currently working on a subway for Windows 8 using C # and SharpDX. The project is going well, but lately it is necessary to start tracking memory leaks, and I'm not sure where to start.

The built-in memory profiler in Visual Studio 11 does not yet work for metro applications, WinDBG seems to be unable to connect to metro applications (unless I use it incorrectly), and it is difficult for me to find any information about viewing managed allocations in .NET 4.5 for Metro.

Does anyone have any experience? Is there a good place to start looking? Has anyone been successful with tools that help detect memory leaks in metro applications?

+6
source share
3 answers

Looks like I really could use WinDbg, it just didn't work with invasive mode. My mistake.

+2
source

I would at least assume that memory leaks are not caused by Metro or SharpDX.

Check this out: C # memory leaks

(Or just look for SO for "C # memory leaks.")

Once you have passed the checklist of things extracted from the above link / search query, go on to check the code associated with SharpDX / Metro. The best recommendations came from my mother when I was young: "Get out after yourself when you finish playing." Dispose of objects when you are finished with them, do not leave databases, files or memory streams open longer than you need. This is the reason for many memory leak problems, including mine.

+1
source

I suggest you use http://msdn.microsoft.com/en-us/magazine/jj721593.aspx . There are many explanations for memory leaks.

-1
source

Source: https://habr.com/ru/post/912321/


All Articles