Bug 779 - NEWT: Use WeakReferences for Display, Screen and Window Caches
Summary: NEWT: Use WeakReferences for Display, Screen and Window Caches
Status: RESOLVED FIXED
Alias: None
Product: Newt
Classification: JogAmp
Component: core (show other bugs)
Version: 1
Hardware: All all
: --- enhancement
Assignee: Sven Gothel
URL:
Depends on:
Blocks:
 
Reported: 2013-07-11 05:05 CEST by Sven Gothel
Modified: 2013-07-11 05:05 CEST (History)
0 users

See Also:
Type: ---
SCM Refs:
99479bf3197cde8e89c5b499d135417863d521c7 d4c022b6b0fe7c3553c7ae218758d6e062905e10
Workaround: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Sven Gothel 2013-07-11 05:05:07 CEST
Removing ref. at API destroy() is wrong ; Allow GC to clear ..

    - Removing ref. at API destroy() is wrong
      - Since all instances can be recreated, removing ref at destroy() is simply wrong.
      - Keep weak references until GC collects, i.e. user does not claim them anymore.
        - Safe for Display, since it holds it's EDT thread.
        - Window/Screen .. if user abandons reference .. nothing we can do here.
    
    - Allow GC to clear ..
      No need to hold ref loonger than user.