Speed up Windows 7 by forcing it to unload unused DLLs and delete cached ones

Windows is often quite slow in unloading DLLs. Even when programs using given DLLs quit, Windows can ‘carry’ around the DLLs for quite a while until it unloads them. Well we will show you how to force Windows 7 to unload them and to delete the cached ones.
Like so many ‘hacks’ this one is done by modifying the registry.

Open the Start menu, enter regedit in the Start menu search box and press Enter:


Speed up Windows 7 by forcing it to unload unused DLLs and delete cached ones

The registry editor will open:

Speed up Windows 7 by forcing it to unload unused DLLs and delete cached ones

In the left pane navigate to HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Explorer:

Speed up Windows 7 by forcing it to unload unused DLLs and delete cached ones

In the right pane, right-click and select New > DWORD (32-bit) Value:

Speed up Windows 7 by forcing it to unload unused DLLs and delete cached ones

Name the DWORD AlwaysUnloadDLL:

Speed up Windows 7 by forcing it to unload unused DLLs and delete cached ones

Double-click on it and a new window will open:

Speed up Windows 7 by forcing it to unload unused DLLs and delete cached ones

In the Value data textbox enter the value 1:

Speed up Windows 7 by forcing it to unload unused DLLs and delete cached ones

Press OK, close the Registry Editor and restart Windows for the changes to take effect.

Tags

Filed Under: Windows 7

Anthony Gee About the Author: Anthony G. is an IT specialist with more than 9 years of solid working experience in the Web Hosting industry. Currently works as server support administrator, involved in consultative discussions about Web Hosting and server administration. One of the first writers in the Onlinehowto.net website, now writing for Free Tutorials community - he is publishing tutorials and articles for the wide public, as well as specific technical solutions.

Comments (3)

  1. Sean says:

    I’m having an issue with Windows 7 unloading DLLs while playing some games, causing those games to crash. By any chance is there a way to disable the forced unloading of DLLs in a similar way to forcing the system to always unload them?

  2. Larry Miller says:

    This article is just so wrong in so many ways.

    For starters:

    1. This setting has not been supported since Windows 2000.
    2. The setting refers only to shell extension DLLs.
    3. Even in a supported configuration and with shell extensions the setting does not control removal of the DLL from memory, only from the process address space.
    4. True, Windows does not remove DLLs from memory when no longer needed. The same applies to other executable files. But this is a good thing. This memory goes to the standby list where it is considered available and can be assigned to any process. This behavior goes back to NT 3.1 which was released in 1993 and has been extensively tested. Linux and Mac OS do much the same.

    Please do some research before writing articles.

Leave a Reply