Versions des environnements
J'aime (1)
Naomi Nosonovsky
>>Does anybody know if issuing CLEAR DLLS will clear the dll in such a way that
>>any memory it leaked during execution is reclaimed before the app instance
>>truly terminates?
>>I have a DLL that does this from time to time. I'd like to just CLEAR DLLS it out
>>from time to time by name and then immediately re-load it --- if this would work. :-)
>
>Dunno and doubt it - but keep us posted of your findings.
It works. Yes, CLEAR DLLS _does_ remove the allocated memory from the DLL.
Methodology:
I created a custom DLL and test program which called the DLL and repeatedly allocated memory in 256MB blocks within the DLL using maloc(), but without an associated free(). It was in a loop and allocated about 2 GB of memory. This was visible in the Windows Task Manager as a sudden sharp increase in the graph on the "Performance" page, as well as the memory allocated on the "Processes" page. It climbed from about 5MB at startup to over 2GB while stepping through code. Then, when CLEAR DLLS was issued, it dropped back down to 5MB.
So ... problem solved. Crisis averted. :-)
Précédent
Répondre
Voir le fil de ce thread
Voir le fil de ce thread à partir de ce message seulement
Voir tous les messages de ce thread
Voir tous les messages de ce thread à partir de ce message seulement