Windows - Unload DLL from cache

October 2016


Once an application launched, your OS stores all related DLL file to be reactivated at next startup.
These DLLs are very high in terms of memory size (stays on memory) even after shutting down.
There are many software for managing memory which also use memory.


Below is a simple tip of tips how to force memory for removing unused DLL.
Note: It is recommended to make a back up of the registry before proceeding with any configuration.
Back up of the registry
  • Open the registry editor. (Start <Run <Regedit)
  • Scroll to: HKEY_LOCAL_MACHINE \ SOFTWARE \ Microsoft \ Windows \ CurrentVersion \ Explorer
  • Click on Edit <New <then DWORD Value.
  • Create the DWORD value in the naming AlwaysUnloadDll.
  • Once "AlwaysUnloadDll" created, right-click this value, then choose "edit".
  • Set the value data to 1, and then click OK.
  • Close the Registry Editor and restart the computer.
  • Now unused DLLs will be removed from the closure of programs.

Related :

This document entitled « Windows - Unload DLL from cache » from CCM ( is made available under the Creative Commons license. You can copy, modify copies of this page, under the conditions stipulated by the license, as this note appears clearly.