-
Bug
-
Resolution: Fixed
-
P4
-
1.1.5
-
b01
-
x86
-
solaris_2.5.1
In the JDK1.1.x win32 build the native method deletepData in
java.awt.image.ColorModel is missing. So there is a memory leak
because finalize can never call this method to free the private
data. The following program demonstrates this. It runs fine
under Solaris, but under win32 gives an error.
import java.awt.image.ColorModel;
import java.awt.image.DirectColorModel;
public class Foo {
public static void main(String args[]) {
try {
System.loadLibrary("awt");
} catch (Error e) {
}
try {
System.loadLibrary("winawt");
} catch (Error e) {
}
ColorModel cm = new DirectColorModel(0, 0, 0, 0);
cm.finalize();
}
}
G:\harmless>f:java Foo
java.lang.UnsatisfiedLinkError: deletepData
at java.awt.image.ColorModel.finalize(ColorModel.java:121)
at Foo.main(Foo.java:16)
Also notice that ColorModel.finalize() cannot be called directly without
first calling System.loadLibrary() with a platform-specific library
name. This seems like another bug.
dean.long@Eng 1998-03-04
java.awt.image.ColorModel is missing. So there is a memory leak
because finalize can never call this method to free the private
data. The following program demonstrates this. It runs fine
under Solaris, but under win32 gives an error.
import java.awt.image.ColorModel;
import java.awt.image.DirectColorModel;
public class Foo {
public static void main(String args[]) {
try {
System.loadLibrary("awt");
} catch (Error e) {
}
try {
System.loadLibrary("winawt");
} catch (Error e) {
}
ColorModel cm = new DirectColorModel(0, 0, 0, 0);
cm.finalize();
}
}
G:\harmless>f:java Foo
java.lang.UnsatisfiedLinkError: deletepData
at java.awt.image.ColorModel.finalize(ColorModel.java:121)
at Foo.main(Foo.java:16)
Also notice that ColorModel.finalize() cannot be called directly without
first calling System.loadLibrary() with a platform-specific library
name. This seems like another bug.
dean.long@Eng 1998-03-04