The Com Component Method say(GetChildresponse) requires Byte pointer as input. From .Net Component, while calling GetChildResponse I am creating IntPtr and passing it to Component.
I am only creating the pointer in my .Net Component but allocation of bytes(CoTaskMemAlloc) happens at COM Method. After populating the pointer buffer, I am transferring to memory buffer in .Net method and Free the memorry of the pointer using "Marshal.FreeCoTaskMem"
method. Still I am not sure, whether it is deallocating the memory since the Garbarge collector wont happen immediately.
We are hitting on performance issue while doing load testing and we suspect this might be due to memory allocation that is not getting deallocated properly.
Any pointers would be helpful.
// Get the physical memory address
// Call the GetResponse of the pass through ocpChannel
ocpHeaderBufferPointer, out ocpHeaderBufferSize,
out temporaryResponseBufferSize, (uint)timeout);
View Complete Post