I think a DLL unloads from physical memory when this memory it's needed. As when Windows loads a DLL, it only reserves the virtual memory and maps it to the DLL. If the DLL was not loaded, when the process access it, it causes a page fault, and automatically Windows loads it into physical memory. I suppose the it's the same process when unloading: removing the DLL from memory if RAM it's not needed is a silly task, as maybe Windows must reload the DLL after removing it. I suppose the RAM pages containing the DLL will be marked as they can be used, but if anybody uses this pages, 'reloading' the DLL into physical memory will be a little effort. If I find more information I'll post another message, or if anybody can assure this or correct me, will be pleased!!! :)