Ticket #20 (closed enhancement: wontfix)

Opened 8 years ago

Last modified 3 years ago

Marshal.ReleaseComObject

Reported by: jasper Owned by: michelpons
Priority: major Milestone:
Component: IDL files Version:
Keywords: Cc:

Description

Documentation should mention that for .NET implementations, all external objects must be released using Marshal.ReleaseComObject when they go out of scope. Otherwise .NET will not release the COM objects until GC is invoked, which causes external references to temporary objects to linger, and causes objects to be locked passed Terminate.
It should be mentioned that Marshal.ReleaseComObject will render a COM object inaccessible, so this should not be done on a particular interface to a COM object while other interfaces to the same object must remain valid.
Example: IPersistStreamSave should Marshal.ReleaseComObject the stream pointer within the routine.
Example: objects connected to unit ports should Marshal.ReleaseComObject at Disconnect and Terminate.

Change History

comment:1 Changed 3 years ago by michelpons

  • Status changed from new to closed
  • Resolution set to wontfix

Such an advisory should be part of M&T Integrated Guidelines. Not directly related to the distribution of CAPE-OPEN TLB/PIA by the CAPE-OPEN IDL project.

Note: See TracTickets for help on using tickets.