On Tue, 17 Dec 2019 20:12:52 GMT, Ambarish Rapte <[email protected]> wrote:
>> The finalize() method is deprecated in JDK9. See [Java 9 deprecated >> features](https://www.oracle.com/technetwork/java/javase/9-deprecated-features-3745636.html). >> And so the JPEGImageLoader.finalize() method should be removed. >> >> The change is, >> 1. Remove finalize method from JPEGImageLoader class. >> >> 2. Instance of JPEGImageLoader is created and used in ImageStorage class. >> JPEGImageLoader.dispose() should be called after it's use over. This would >> be a common call for the other (GIF, PNG, BMP) ImageLoader classes, which >> have empty dispose() method. >> >> 3. JPEGImageLoader.load() method almost always calls the dispose() method >> after the image is loaded. In normal scenario JPEGImageLoader is disposed >> here. The calls to dispose() added in ImageStorage seem logically correct >> place to add and should be added. >> >> Verification: >> Verified :graphics:test and system tests on all three platforms. >> Verified that JPEGImageLoader.dispose() is always initiated by >> JPEGImageLoader.load() > > The pull request has been updated with 1 additional commit. While it's hard to proof that the dispose() is now called in all possible end scenario's, I don't see a path where it would not be called after applying the PR. The iOS change is fine. ------------- Marked as reviewed by jvos (Reviewer). PR: https://git.openjdk.java.net/jfx/pull/50
