Bug 1410 - Fix NEWT PointerIcon Lifecycle (destroy and clean references @ closing)
Summary: Fix NEWT PointerIcon Lifecycle (destroy and clean references @ closing)
Alias: None
Product: Newt
Classification: JogAmp
Component: core (show other bugs)
Version: 2.4.0
Hardware: All all
: P4 critical
Assignee: Sven Gothel
Depends on:
Reported: 2019-12-06 02:01 CET by Sven Gothel
Modified: 2019-12-06 03:37 CET (History)
1 user (show)

See Also:
SCM Refs:
d5ba4cae824087879a4857e20961a95da04eaebb d693425e2e74a5e4a80c3fde552ffc7d757330f1 75afd5c6be7f68b32fbe9e5d319d888888b30719 de13e49aadd4b4df09eb1ab37c84cda404586ba5
Workaround: ---


Note You need to log in before you can comment on or make changes to this bug.
Description Sven Gothel 2019-12-06 02:01:06 CET
Commit d5ba4cae824087879a4857e20961a95da04eaebb clarified and simplified the lifecycle of a PointerImpl instance, i.e. drop its resurrection in 
PointerImpl.validateHandle() in favor of a hard exception.

This caused detection of subsequent PointerImpl lifecycle issues,
as instances were not fully destroyed on Display closing and 
references not null'ed in Display and Screen instances.
Comment 1 Sven Gothel 2019-12-06 02:02:24 CET

NEWT: Align DisplayImpl.createPointerIcon(..) behavior; PointerIconImpl.validatedHandle() shall not create native resource.
    Semantic cleanup for clarity and equal behavior
    Align DisplayImpl.createPointerIcon(..) behavior
    - return null handle of createPointerIconImplChecked(..) shall be accepted,
      no exception for neither of the two creation methods.
    PointerIconImpl.validatedHandle() shall not create native resource.
    - throws exception if handle is null (about to be used)
    - no native creation shall happen here.
    Display.PointerIcon.validate(): Removed, not used.
Comment 2 Sven Gothel 2019-12-06 02:08:50 CET
PointerIcon new instances are always valid ..
Move native handle check to pre-destruction call in
PointerIconImpl.destroyOnEDT(..), unifying single destruction and all.


Fix regression of commit NEWT DisplayImpl/PointerIcon: Don't use blocking isNative...
This bug never allowed a PointerIconImpl to be destroyed via PointerIconImpl.destroy()


Fix NEWT PointerIcon Lifecycle (destroy and clean references @ closing)
Fixed as described in comment 0.
Comment 3 Sven Gothel 2019-12-06 03:37:58 CET
validated via unit tests