Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.clipper.visual-objects > #9341
| From | "Jamal Assaf" <someone@example.com> |
|---|---|
| Newsgroups | comp.lang.clipper.visual-objects |
| Subject | Re: GDI Objects creeping up |
| Date | 2016-05-07 13:12 -0400 |
| Organization | albasani.net |
| Message-ID | <ngl7ko$52a$1@news.albasani.net> (permalink) |
| References | <nga8uu$n54$2@dont-email.me> |
From long time ago, some brilliant soul on this NG wrote these functions; it
may help find the issue you are encountering:
FUNCTION GCDump(nType)
LOCAL pDump AS _GCDUMP
LOCAL pEntry AS _GCENTRY
LOCAL nAlloc AS INT
LOCAL nEntries, dwCount AS DWORD
LOCAL aTypeStr AS ARRAY
// If you don't pass a value, default to all references
Default(@nType, 0 )
aTypeStr := {"*","**","FLOAT","****","ARRAY","OBJECT","STRING"} // GC
entry types
IF !InCollect()
CollectForced()
ENDIF
DynLock() // lock up dynamic mem to obtain accurate result
nAlloc := _SIZEOF(DWORD) + 100 * _SIZEOF(_GCENTRY)
pDump := MemAlloc(nAlloc)
IF pDump != NULL_PTR
pDump.nEntryCount := 100
nEntries := CreateGCDump(pDump, nType)
LogIt("Total Entries: " + NTrim(nEntries),
MyGetCurPath()+"GCDump.log")
FOR dwCount := 1 UPTO nEntries
pEntry := @pDump.GCE[dwCount]
LogIt("====== Entry: " + NTrim(dwCount) + " =======:",
MyGetCurPath()+"GCDump.log")
LogIt("Created by : " + IIF(pEntry.nGCType == GC_TYPE_STACK,
"Compiler", "RegisterKid()"),MyGetCurPath()+"GCDump.log")
LogIt("Var. Type : " +
aTypeStr[pEntry.nVarType],MyGetCurPath()+"GCDump.log")
LogIt("Dyn. Addr. : " +
AsString(pEntry.pDynMem),MyGetCurPath()+"GCDump.log")
LogIt("Size (bytes): " +
NTrim(pEntry.nSize),MyGetCurPath()+"GCDump.log")
LogIt("Ref. Addr. : " +
AsString(pEntry.ppRefDynMem),MyGetCurPath()+"GCDump.log")
LogIt("Value : " +
Psz2String(@pEntry.abValue[1]),MyGetCurPath()+"GCDump.log")
NEXT
ENDIF
DynUnLock()
RETURN
FUNCTION LogIt(cMsg AS STRING,cFile AS STRING) AS VOID PASCAL
LOCAL ptrFile AS PTR
IF LOG_FILE_ON
IF File(cFile)
ptrFile := FOpen2(cFile,FO_READWRITE)
// Move to bottom of file
FSeek(ptrFile, 0, FS_END)
ELSE
ptrFile := FCreate2(cFile,FC_NORMAL)
ENDIF
FWriteLine(ptrFile,DToC(Today())+"-"+Time()+":"+cMsg)
FClose(ptrFile)
ENDIF
RETURN
DEFINE LOG_FILE_ON := TRUE
FUNCTION GCDumpNone()
IF !InCollect()
CollectForced()
ENDIF
RETURN
Jamal
"Martin" wrote in message news:nga8uu$n54$2@dont-email.me...
Hello
I use the following to monitor GDI Objects
GetGuiResources(GetCurrentProcess(),GR_GDIOBJECTS)
And now we are finding that is it creeping up a lot.
Any ideas what to check, I know there must be a leak, but where do I look?
Thanks
Martin
Back to comp.lang.clipper.visual-objects | Previous | Next — Previous in thread | Find similar | Unroll thread
GDI Objects creeping up Martin <Martin@spam.spam> - 2016-05-03 14:30 +0100
Re: GDI Objects creeping up "Arne Ortlinghaus" <Arne.Ortlinghaus@acs.it> - 2016-05-04 08:58 +0200
Re: GDI Objects creeping up Martin <Martin@spam.spam> - 2016-05-04 09:07 +0100
Re: GDI Objects creeping up Martin <Martin@spam.spam> - 2016-05-04 11:05 +0100
Re: GDI Objects creeping up Karl Faller <mail_withoutthat_@_drei-f_andthat_.de> - 2016-05-04 11:21 +0200
Re: GDI Objects creeping up Martin <Martin@spam.spam> - 2016-05-04 11:10 +0100
Re: GDI Objects creeping up Benito Fernández Meneses <bfernandez@bfmconsultores.com.mx> - 2016-05-04 10:29 -0500
Re: GDI Objects creeping up "Jamal Assaf" <someone@example.com> - 2016-05-04 21:34 -0400
Re: GDI Objects creeping up Camille Kater <katercam@pt.lu> - 2016-05-05 09:52 +0200
Re: GDI Objects creeping up Otto Christiaanse <ofchristiaanse@gmail.com> - 2016-05-05 03:47 -0700
Re: GDI Objects creeping up "Jamal Assaf" <someone@example.com> - 2016-05-07 13:09 -0400
Re: GDI Objects creeping up "Jamal Assaf" <someone@example.com> - 2016-05-08 00:50 -0400
Re: GDI Objects creeping up Otto Christiaanse <ofchristiaanse@gmail.com> - 2016-05-17 02:33 -0700
Re: GDI Objects creeping up Martin <Martin@spam.spam> - 2016-05-05 09:37 +0100
Re: GDI Objects creeping up "Jamal Assaf" <someone@example.com> - 2016-05-07 13:12 -0400
csiph-web