The finalize() method is invoked on an instance for which the constructor has not been invoked. (The reason the constructor hasn't been invoked is probably because an OutOfMemory condition caused an exception to be thrown by the memory allocator). This is non-intuitive for the programmer and probably inconsistent with the language spec.
This is a side-effect observed with the test cases provided for Bug 4109815.
Jar files are attached along with a script jb.sh to run the programs that provoke the problem.
This is a side-effect observed with the test cases provided for Bug 4109815.
Jar files are attached along with a script jb.sh to run the programs that provoke the problem.
- duplicates
-
JDK-4034630 finalization enabled on instance memory allocation, not object construction
- Closed
- relates to
-
JDK-4109815 java.lang.ref.SoftReference instances not being cleared in time
- Closed