D
Don Nell
Hello
Why is there a memory leak when this VB code is executed.
do
set locator = createobject("wbemscripting.swbemlocator")
set oWMI = locator.connectserver("MachineName" ,
"root/cimv2","UserName","Password")
loop
There is no leak if the username and password is blank and the computer is
in a domain. At first I thought it had something to do with Windows'
inablility to release more than 9 security context entries per 10 seconds
(see link below), but the leak still exist when I slow it down.
http://support.microsoft.com/default.aspx?scid=kb;en-us;890196
I also tried calling RpcMgmtEnableIdleCleanup() at startup and also forcing
any unused memory back to the operating system with
SetProcessWorkingSetSize(...) but nothing helps. The Windows task manger
always shows my application consuming more and more memory until it finally
crashes.
Thanks.
Don
Why is there a memory leak when this VB code is executed.
do
set locator = createobject("wbemscripting.swbemlocator")
set oWMI = locator.connectserver("MachineName" ,
"root/cimv2","UserName","Password")
loop
There is no leak if the username and password is blank and the computer is
in a domain. At first I thought it had something to do with Windows'
inablility to release more than 9 security context entries per 10 seconds
(see link below), but the leak still exist when I slow it down.
http://support.microsoft.com/default.aspx?scid=kb;en-us;890196
I also tried calling RpcMgmtEnableIdleCleanup() at startup and also forcing
any unused memory back to the operating system with
SetProcessWorkingSetSize(...) but nothing helps. The Windows task manger
always shows my application consuming more and more memory until it finally
crashes.
Thanks.
Don