View Issue Details

IDProjectCategoryView StatusLast Update
0000429.NET APIImplementation Bugpublic2008-08-13 02:08
ReporterRandy Armstrong Assigned ToRandy Armstrong  
PrioritynormalSeverityminorReproducibilityalways
Status resolvedResolutionunable to reproduce 
Summary0000429: OpcCom.Interop.CreateInstance repeatedly causes a memory leak
Description

I found that calling OpcCom.Interop.CreateInstance repeatedly causes a memory leak.

The following allocated memory does not get released upon leaving CreateInstance method:

Code:

GCHandle hClsid = GCHandle.Alloc(IID_IUnknown, GCHandleType.Pinned);

Adding the following code in the finally block will dealloate the memory:

Code:

if (hClsid.IsAllocated)
{
hClsid.Free();
}

brian

Additional Information

http://www.opcfoundation.org/forum/viewtopic.php?p=8686&sid=bc65edfe1d38a5a844e0c90df40aba3d#8686

TagsNo tags attached.

Activities

Randy Armstrong

2008-08-13 02:08

administrator   ~0000745

The code as quoted does not exist in the current code base.

The OpcCom.Interop.CreateInstance

already has a call to if (hIID.IsAllocated) hIID.Free();

Issue History

Date Modified Username Field Change
2008-08-07 16:58 Randy Armstrong New Issue
2008-08-13 01:58 Randy Armstrong Status new => assigned
2008-08-13 01:58 Randy Armstrong Assigned To => Randy Armstrong
2008-08-13 02:08 Randy Armstrong Status assigned => resolved
2008-08-13 02:08 Randy Armstrong Resolution open => unable to reproduce
2008-08-13 02:08 Randy Armstrong Note Added: 0000745