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
Ginger1
Tue Jan 28 15:34:48 2025
from
London
via
SSH
Guest
Tue Jan 28 06:40:34 2025
from
/bin/busybox Cat /proc/self/ex
via
Raw
Gwylbert
Tue Jan 28 04:48:36 2025
from
Sydney, Nsw
via
Telnet
Guest
Tue Jan 28 03:02:48 2025
from
/bin/busybox Cat /proc/self/ex
via
Raw
Keyop
Tue Jan 28 00:51:06 2025
from
Huddersfield, West Yorkshire
via
SSH
Keyop
Tue Jan 28 00:50:25 2025
from
Huddersfield, West Yorkshire
via
SSH
Keyop
Tue Jan 28 00:49:39 2025
from
Huddersfield, West Yorkshire
via
SSH
Guest
Mon Jan 27 22:26:23 2025
from
/bin/busybox Cat /proc/self/ex
via
Raw
System Info
Sysop:
Keyop
Location:
Huddersfield, West Yorkshire, UK
Users:
407
Nodes:
16 (
2
/
14
)
Uptime:
17:04:16
Calls:
8,555
Calls today:
7
Files:
13,219
Messages:
5,925,893