|
Neohapsis is currently accepting applications for employment. For more information, please visit our website www.neohapsis.com or email hr@neohapsis.com |
From: Zlatko Michailov (michailov
AUSTIN.APC.SLB.COM)Date: Tue Oct 02 2001 - 19:18:49 CDT
When you unmarshal from the GIT, you have a proxy created in your target
apartment. How proxies are implemented, I don't know but they use memory for
sure. The code of your ThreadProc might give us more information e.g. if you
initialize the new threads as STA, then you definitely force the COM
run-time to use your memory.
Zlatko
-----Original Message-----
From: Distributed COM-Based Code [mailto:DCOM
DISCUSS.MICROSOFT.COM]On
Behalf Of Joan Ramon López Gillué
Sent: Friday, September 28, 2001 7:30 AM
To: DCOM
DISCUSS.MICROSOFT.COM
Subject: leak in GetInterfaceFromGlobal
Hi all,
I'm getting a strange memory leak when using GetInterfaceFromGlobal from a
thread.
Basically what I do is:
1. CoCreate a dummy component "A" and get its "Ia" interface.
2. Register interface "Ia" in the GIT with RegisterInterfaceInGlobal
3. while (!_kbhit) {
Create a thread which gets "Ia" from the GIT and then releases it.
MessageLoop;
}
====================================
When I execute the program the Task Manager shows how memory used by the
process raises
in blocks of 4Kb (sometimes 8Kb).
If I comment out the line where I call "GetInterfaceFromGlobal" (and nothing
else) the memory leak stops.
Any hint about what I can be doing wrong?
Thank a lot
----------------------------------------------------------------
Users Guide http://discuss.microsoft.com/archives/mailfaq.asp
contains important info. Save time, search the archives at
http://discuss.microsoft.com/archives/index.html .
To unsubscribe, mailto:DCOM-signoff-request
DISCUSS.MICROSOFT.COM
----------------------------------------------------------------
Users Guide http://discuss.microsoft.com/archives/mailfaq.asp
contains important info. Save time, search the archives at
http://discuss.microsoft.com/archives/index.html .
To unsubscribe, mailto:DCOM-signoff-request
DISCUSS.MICROSOFT.COM
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]