Pop-Up Thingie
Sidebar
>>> Magnum BBS <<<
Home
Forum
Files
Dark
Log in
Username
Password
Sidebar
Forum
Usenet
COMP.LANG.XHARBOUR
Memory Leak - xharbour
From
Eduardo Motta
@21:1/5 to
All
on Thu Oct 14 10:35:37 2021
Running the example below the application accumulates memory indefinitely.
Function TestMemoryLeak()
While LastKey() # 27
? InExecution("teste.exe")
HB_GCALL(.t.)
inkey(.01)
EndDo
Return
Static FUNCTION WMIService()
static oWMI
local oLocator
if oWMI == nil
oLocator := CREATEOBJECT( "wbemScripting.SwbemLocator" )
oWMI := oLocator:ConnectServer()
endif
return oWMI
Static Function InExecution(cNameApl)
Local oWmi, oList, oProc
Local cExecName := cNameApl
Local nCont := 0
oWmi := WmiService()
oList := oWmi:ExecQuery( "select * from Win32_Process" )
For each oProc in oList
Try
if cExecName in lower(oProc:ExecutablePath)
nCont++
endif
catch
End
Next
Return nCont
--- SoupGate-Win32 v1.05
* Origin: fsxNet Usenet Gateway (21:1/5)
Who's Online
Recent Visitors
Brianm
Sun Sep 8 00:54:31 2024
from
Glasgow
via
Raw
Keyop
Sun Sep 8 00:16:02 2024
from
Huddersfield, West Yorkshire
via
SSH
Keyop
Sun Sep 8 00:15:46 2024
from
Huddersfield, West Yorkshire
via
SSH
Bob Worm
Sat Sep 7 22:43:20 2024
from
Wales, Uk
via
Telnet
Bob Worm
Sat Sep 7 21:40:55 2024
from
Wales, Uk
via
Telnet
Bob Worm
Sat Sep 7 20:53:17 2024
from
Wales, Uk
via
Telnet
Zharous
Sat Sep 7 20:26:45 2024
from
Tempe, Az
via
Telnet
Keyop
Sat Sep 7 03:23:27 2024
from
Huddersfield, West Yorkshire
via
SSH
System Info
Sysop:
Keyop
Location:
Huddersfield, West Yorkshire, UK
Users:
339
Nodes:
16 (
0
/
16
)
Uptime:
07:08:07
Calls:
7,467
Calls today:
3
Files:
12,691
Messages:
5,626,307