The information in this article applies to:
SYMPTOMSNative code that uses Java Native Interface (JNI) methods such as NewStringUTF to allocate memory may not free that memory after a call to DeleteLocalRef until the program exits. CAUSEAlthough DeleteLocalRef releases the memory used to store the object, that memory is never reused for new objects. RESOLUTION
Install version 3181, or later, of the Microsoft virtual machine for Java, where this problem has been fixed. STATUSMicrosoft has confirmed this to be a problem in the Microsoft products listed at the beginning of this article. MORE INFORMATIONSteps to Reproduce BehaviorCreate a file Test.cpp with the following code:
Compile and link using a command similar to this:
Now run the Test.exe file and observe the memory usage in Task Manager in Windows NT or in the System Monitor in Windows 95 and 98.
REFERENCES
The Microsoft VM build 3181, or later, is available for download at the
Developer Updates for Microsoft SDK for Java 3.2.
http://support.microsoft.com/support/visualj/ © Microsoft Corporation 1999, All Rights Reserved. Additional query words:
Keywords : kbJavaVM kbJNative kbGrpJava kbDSupport |
Last Reviewed: November 20, 1999 © 2000 Microsoft Corporation. All rights reserved. Terms of Use. |