FIX: Automation Object Not Being Released After Call To ComLib.release() (218595)
The information in this article applies to:
- Microsoft Visual J++ 1.1
- Microsoft Visual J++ 6.0
- Microsoft SDK for Java 2.0
- Microsoft SDK for Java 2.01
- Microsoft SDK for Java 2.02
- Microsoft SDK for Java 3.0
- Microsoft SDK for Java 3.0 Preview 1
- Microsoft SDK for Java 3.1
This article was previously published under Q218595 SYMPTOMS
When automating an Office product as an out-of-proc server, such as Excel or Word, even though the automation object has been released (through the use of ComLib.release()), its resources may not be freed and the Office product process may not exit after the Java program has exited. For more details on ComLib.release(), see the following article in the Microsoft Knowledge Base:
179062 PRB: COM Objects Are Not Being Released in Java
CAUSE
The actual proxy Interface pointer is on another virtual machine thread, waiting to be released, and may not get enough CPU time to make the call.
RESOLUTION
In some cases on more recent builds of the Microsoft virtual machine (Microsoft VM), this workaround will fix the problem. Make a call to ComLib.release as usual, but then also include a call to System.gc() and put the thread to sleep long enough for the object to be released. This problem has been fixed in build 3167 of the Microsoft VM.
STATUSThis bug was corrected in the Microsoft virtual machine version 3167. Build 3167 is the build associated with the SDK for Java version 3.2. The Visual Studio Service Pack 3 also contains this fix in build 3176 of the Microsoft VM.
REFERENCES
For support information about Visual J++ and the SDK for Java, visit the following Microsoft Web site:
For the lastest version of the Microsoft virtual machine, and for more information on known issues in the SDK for Java version 3.2, visit the following Microsoft Web site: . For more information on Visual J++ fixes included in Service Pack 3, please consult the Visual J++ Fixes page.
Modification Type: | Major | Last Reviewed: | 6/14/2006 |
---|
Keywords: | kbbug kbFAQ kbfix kbVJ600fix KB218595 |
---|
|