RFR: 8361067: Test ExtraButtonDrag.java requires frame.dispose in finally block [v9]
Ravi Gupta
rgupta at openjdk.org
Wed Aug 20 04:55:46 UTC 2025
On Wed, 13 Aug 2025 21:56:39 GMT, Damon Nguyen <dnguyen at openjdk.org> wrote:
>> Ravi Gupta has updated the pull request incrementally with one additional commit since the last revision:
>>
>> 8361067: Added review comment
>
> test/jdk/java/awt/Mouse/MouseModifiersUnitTest/ExtraButtonDrag.java line 186:
>
>> 184: if (frame != null) {
>> 185: frame.dispose();
>> 186: frame = null;
>
> Usually `frame.dispose()` is enough but having `frame = null` is fine too I suppose.
@DamonGuy thanks for suggestion , i usually used both as
frame.dispose() to release native resources and make the window disappear.
frame = null; to help the GC reclaim the object
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/26043#discussion_r2286976783
More information about the client-libs-dev
mailing list