PRB: MTS Event Log 4098 "Unexpected Object Reference Count" (259463)
The information in this article applies to:
- Microsoft Transaction Server 2.0, when used with:
- Microsoft Windows NT Server 4.0
- Microsoft Windows NT Workstation 4.0
This article was previously published under Q259463 SYMPTOMS
Microsoft Transaction Server (MTS) may log the following informational event:
Unexpected object reference count. The object still had references after
the run-time environment released its last reference. Unbind
(Package: PSLk108 OSEP) (ProgId: Project.Class) (CLSID: {EA6CD25E-2B12-11D3-8F30-0001FA328EF7}) (Interface: IUnknown) (IID: {00000000-0000-0000-C000-000000000046}) (Method: 2) (Microsoft Transaction Server Internals Information: File: d:\viper\src\runtime\context\ccontext.cpp, Line: 2807)
CAUSE
This log indicates that an object did not return 0 (zero) from the IUnknown::Release method when the MTS context wrapper was releasing it. This informational message indicates the possibility of a leak.
There are two possible reasons for this log:
- Someone called AddRef on your component without releasing it. This may have been done without the context wrapper. As a result, an instance is left (hanging around--colloquial) in memory, which most likely contributes to a memory leak for the process. To fix this problem, you must find the offending code and correct it.
- The component is not returning 0 (zero) from IUnknown. The object is released when it has a reference count of 0. The COM specification does not require this, and some tools (such as PowerBuilder) do not return 0 from the last Release.
In this case, to stop the event log, you must wrap the objects in other components (such as Microsoft Visual Basic components) that return 0 from the Release call. The wrapping components must be installed in MTS, and the wrapped components, which must not be installed in MTS, must reside in the same apartment as the wrapping component.
RESOLUTION
To resolve this problem, track the usage of the component that is named in the error message after ProgID. Make sure that you use SafeRef when the component is handing out references to itself.
STATUS
This behavior is by design.
Modification Type: | Major | Last Reviewed: | 2/1/2001 |
---|
Keywords: | kbDSupport kbprb KB259463 |
---|
|