Fix memory leaks in Windows

How To Avoid And Fix Memory Leaks In Windows 10

You might have encountered issues with computer performance, potentially causing memory leaks. Various software can slow down your computer if it leaks memory (when a program fails to 'release' memory it has used). By default, a closed program should allow other software then to use that same area of memory. If, however, the program is still using the memory having been closed, that is where memory leak problems begin.

A memory leak is a Random Access Memory (RAM) loss caused by one or more programs. Therefore, a specific program is using more memory than it should, or it is not releasing it when the program closed, and continues to use the memory. A certain amount of RAM is required for a process to run, and this is perfectly normal, unless the system starts to behave abnormally. Memory leaks are usually only temporary, since restarting the computer empties RAM memory. If, however, the computer remains switched on with various processes running in the background, some processes might cause memory leaks.

As mentioned above, closed programs should not use Random Access Memory and should release previously-allocated memory. If you face memory leaks each time you work with your computer using default programs, then clearly there is a problem that needs to be solved. To fix memory leaks in Windows 10, you might need to kill a program using Task Manager, run a memory diagnostic tool, disable startup programs, defragment the hard drive, scan the system for malware, edit Windows Registry, and take other measures. Read the guide below and try the methods described to solve memory leak issues on the Windows operating system.

how to fix memory leak

Table of Contents:

Edit Registry

Windows Registry, usually referred to as just 'the registry', is a collection of databases of configuration settings in Microsoft Windows operating systems. It is used to store much of the information and settings for software programs, hardware devices, user preferences, operating system configurations, and much more. Many of the options exposed in the registry are not accessible elsewhere in Windows. To open Registry Editor, you will first need to open Run dialog box. Press Windows Windows key + R or right-click Start and select "Run" and type "regedit". Press Enter or click "OK".

NOTE: Create a restore point before you make any changes in Windows Registry (editing the Registry incorrectly can lead to more serious problems).

edit registry step 1

Follow this path by expanding every entry until you find the "Ndu" key: "HKEY_LOCAL_MACHINE\SYSTEM\ControlSet001\Services". Find "Ndu" key under Services and select it. Now you should see the "Start" REG_DWORD on the right pane. Double-click it and assign the value data to 4. Click "OK" to save the changes.

edit registry step 2

Now find the "Null" key under the same Services key and double-click "Start" REG_DWORD. Also set its value to 4 . Click "OK" to save the changes.

edit registry step 3

Now follow this path: "HKEY_LOCAL_MACHINE\SYSTEM\ControlSet001\Control\Session Manager" and select the "Memory Management" key. Double-click the "NonPagedPoolSize" REG_DWORD on the right pane. Change Base to "Decimal" and set value data to 192. Click "OK" to save the changes, exit Registry and see if memory leak problem is now solved. If not, try to restart your computer after editing the Registry.

[Back to Table of Contents]

Disable Superfetch

Superfetch is a Windows service that is intended to speed up application launching and improve system responsiveness. It caches data so that it can be immediately available to your application. Superfetch achieves this by preloading frequently-used programs into RAM so that they are not required to be called from the hard drive. This can sometimes affect performance and slow down the system, or cause memory leaks. To disable Superfetch, open the Run dialog box and type "services.msc". Press Enter on the keyboard or click "OK".

disable superfetch step 1

In the Services window, you will see a list of local services. Scroll down to find "Superfetch" and right-click it, select "Properties" from the contextual menu.

disable superfetch step 2

Now set the "Startup type" to "Disabled" and stop the service by pressing the "Stop" button. Click "Apply" to save the changes, restart your computer, and check if this solves the memory leak problem.

disable superfetch step 3

[Back to Table of Contents]

Run Windows Memory Diagnostic Tool

Run the built-in Windows Memory Diagnostic tool. Windows Memory Diagnostic is a memory test tool, which is comprehensive and easy to use. To launch it, type "windows memory diagnostic" or "mdsched" in Search and click the "Windows Memory Diagnostic" result.

run windows memory diagnostic tool step 1

To run diagnostics, restart the computer. You will be asked if you want to restart now or to run it the next time you start your computer. When you restart the computer, Windows Memory Diagnostic Tool will start automatically. You will be able to see the test process and results on the screen.

run windows memory diagnostic tool step 2

[Back to Table of Contents]

Scan your System For Malware

Malware, viruses, and other infections could be the reason for memory leaks. If you suspect this is the case, scan your system using antivirus software. Furthermore, scan your system from time-to-time. You can use Windows Defender (a built-in antivirus program), which protects your computer against viruses, spyware, and other malicious software. Alternatively, you can run other third-party antivirus software if you have a suitable program installed. To run a full system scan using Windows Defender, type "virus" in Search and click on the "Virus & threat protection" result.

scan your system for malware step 1

In the Virus & threat protection window, find and click the "Run a new advanced scan" option.

scan your system for malware step 2

You will see a list of advanced scans. We recommend that you choose the "Full scan", which will check all files and running programs on your hard disk. Note that this will take some time (usually over an hour) to complete. To start a Full scan, click "Scan now" when the "Full scan" option is selected.

scan your system for malware step 3

If you wish, choose a virus and malware scanner from our Top anti-malware list. The list contains well-known, top spyware removers and will help you choose the right software for your computer's protection. You can find the list by clicking this link

[Back to Table of Contents]

Defragment Your Hard Drive

A built-in Windows feature called "Defragment and Optimize Drives" optimizes drives to help the system run more efficiently (or analyzes them to determine if they require optimization). To launch the defragmentation tool, type "defragment" in Search and click the "Defragment and Optimize Drives" result.

defragment your hard drive step 1

You will see a list of drives connected to the computer. Select the hard drive you want to defragment and click "Optimize". The optimization process should take a while. Wait for it to finish.

NOTE: We do not recommend that you defrag your drive if it is a Solid State Drive (SSD) or Hard Disk Drive (HDD).

defragment your hard drive step 2

[Back to Table of Contents]

Update your Drivers

A device driver is a software that informs the operating system and other software how to interact with particular hardware. It is rather like a translator between software and hardware, since they are often created by different manufacturers, companies, or people. Outdated drivers are sometimes the reason for memory leaks in the Windows operating system. Nevertheless, it is generally good practice to keep drivers up-to-date. To update your drivers, open Device Manager by right-clicking the Start button and selecting the "Device Manager" result from the contextual menu, or type "device manager" in Search and click the "Device Manager" result.

update your drivers step 1

In Device Manager, you will see a list of devices connected to your computer. Try to update your display adapter, network adapter and sound, video and game controllers first. Expand the device section and right-click the device, select the "Update driver" option.

update your drivers step 2

You will be asked if you want to search for updated driver software automatically or to browse your computer for driver software. If you select the first option, Windows will search your computer and the internet for the latest driver software for your device. If you select the second option, you will must locate and install the drivers manually. Using this option requires having previously downloaded the driver on your computer or USB flash drive. This is a longer process, since you must download all the latest drivers for all the devices manually by visiting the device manufacturer's official website. Select the option you prefer and follow the instructions.

update your drivers step 3

Update other drivers by repeating the same steps. You can use third-party software to update your drivers automatically without undertaking too much manual work. In this case, we recommend the Snappy Driver Installer, a powerful free driver updater tool for Windows that can store its entire collection of drivers offline. Having offline drivers gives Snappy Driver Installer the ability to access fast driver updates, even if there is no active internet connection. Snappy Driver works with both 32-bit and 64-bit versions of Windows 10, Windows 8, Windows 7, Windows Vista, and Windows XP. Drivers are downloaded through Snappy Driver Installer in 'driverpacks', which are simply collections (packs) of drivers for various hardware such as sound devices, video cards, network adapters, etc. It can also show duplicate drivers and invalid drivers, and it separates the updates that require you to restart your computer, so that they are easier to distinguish from the rest. You can download Snappy Driver Installer here

We hope that one of these methods solved your memory leak problem. It is highly likely that certain software is causing memory leaks and you might need to restart it every time it starts to cause a problem. Alternatively, stop using/uninstall the software if that is an option. If you know of other solutions to this problem, not mentioned in our guide, please share them with us by leaving a comment in the section below.

[Back to Table of Contents]

Video Showing How To Fix Memory Leaks In Windows 10:

[Back to Top]

About the author:

Tomas Meskauskas

I am passionate about computer security and technology. I have an experience of 10 years working in various companies related to computer technical issue solving and Internet security. I have been working as an editor for since 2010. Follow me on Twitter to stay informed about the latest tech news or online security threats. Contact Tomas Meskauskas.

Our guides are free. However, if you want to support us you can send us a donation.