Is there a way to check what memory has been allocated to in a program coded in VS 2010? I've been noticing that a recent program I've been making keeps using more and more memory over time without releasing any.
Also, are there any articles on code design that teaches you good memory management? I seem to be searching the wrong terms on google as I keep getting useless results.
To bring up the window again, click Debug > Windows > Show Diagnostic Tools. Choose Memory Usage with the Select Tools setting on the toolbar. Click Debug / Start Debugging (or Start on the toolbar, or F5). When the app finishes loading, the Summary view of the Diagnostics Tools appears.
Open the memory dump in Visual Studio by using the File > Open > File menu command and select your memory dump. Notice on the Memory Dump Summary page a new Action called Run Diagnostics Analysis.
Press Ctrl + Shift + Esc to launch Task Manager. Or, right-click the Taskbar and select Task Manager. Select the Performance tab and click Memory in the left panel. The Memory window lets you see your current RAM usage, check RAM speed, and view other memory hardware specifications.
There are commercial tools such as ANTS Memory Profiler or .NET Memory Profiler or dotTrace. Secondly, take a look at this MSDN article. Lastly, Maoni Stephens has many blog posts on garbage collection and memory management in .NET. They are all linked here.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With