MS Windows - Simple way to check memory leak

By xngo on February 17, 2020

Create memory dump file

The Task Manager of MS Windows allows you to dump the memory of each running application into a file. Here, we want to get the memory dump Notepad++ application.

Task Manager - Create dump file

The DMP file will be created at C:\Users\YOUR_USER\AppData\Local\Temp\notepad++.DMP.

Open DMP

Open notepad++.DMP with Microsoft Visual Studio. Then, run Debug Managed Memory.

Microsoft Visual Studio - Debug Managed Memory

Object size

It will show you all the object counts and their total memory size used.

Microsoft Visual Studio - Object size

Objects that keep increasing their memory size are potential memory leak.

About the author

Xuan Ngo is the founder of OpenWritings.net. He currently lives in Montreal, Canada. He loves to write about programming and open source subjects.