all groups > dotnet performance > june 2005 >
You're in the

dotnet performance

group:

GC Collection


GC Collection Sethu Madhavan
6/9/2005 7:36:03 AM
dotnet performance: I am developing a Mission Critiacal Application in dotnet which runs in 24X7
hours, This application will receive request and send response, the request
received is from wrapper object for unmanaged code and it send a response to
same wrapper object.

my question is that in wrapper object i am using GC.Keepalive method that i
dont the reference send to the communication object is send or not.

when i calling my application to send and receive methods alone without
data. my application size is growing the GC is not able to collect. how to
RE: GC Collection Dave Black
7/8/2005 10:11:01 PM
I would recommend doing 2 things:

1. implement the Dispose pattern with a Finalizer in the managed code class
holding onto the unmanaged object - see more at
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/cpgenref/html/cpconFinalizeDispose.asp

2. call Marshal.ReleaseComObject on the unmanaged object until the
ReferenceCount is zero. When you refer to a RCW (runtime callable wrapper),
COM increments the reference count on the object and thus holds onto the
memory for that object.

[quoted text, click to view]
AddThis Social Bookmark Button