diff options
author | Leif Åstrand <leif@vaadin.com> | 2014-09-04 09:15:45 +0300 |
---|---|---|
committer | Sauli Tähkäpää <sauli@vaadin.com> | 2014-09-24 21:58:03 +0300 |
commit | 62b1e1c0c00889ac28aab6f8c6b00e5068dbaad7 (patch) | |
tree | ade741bfbbfcc0cf4bb0bf06f716319b2f5be7fd /server/src/com/vaadin/ui/UI.java | |
parent | bed7e19dae06f53d57fcab5c3c53bf76cdfd9792 (diff) | |
download | vaadin-framework-62b1e1c0c00889ac28aab6f8c6b00e5068dbaad7.tar.gz vaadin-framework-62b1e1c0c00889ac28aab6f8c6b00e5068dbaad7.zip |
Document that current session and UI are referenced weakly (#14595)
Change-Id: Iccf6a2b0da6e47b5b14c40e0ebaab52df1eef92a
Diffstat (limited to 'server/src/com/vaadin/ui/UI.java')
-rw-r--r-- | server/src/com/vaadin/ui/UI.java | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/server/src/com/vaadin/ui/UI.java b/server/src/com/vaadin/ui/UI.java index d67e08828a..438b086ec2 100644 --- a/server/src/com/vaadin/ui/UI.java +++ b/server/src/com/vaadin/ui/UI.java @@ -719,9 +719,11 @@ public abstract class UI extends AbstractSingleComponentContainer implements * The application developer can also use this method to define the current * UI outside the normal request handling, e.g. when initiating custom * background threads. - * </p> + * <p> + * The UI is stored using a weak reference to avoid leaking memory in case + * it is not explicitly cleared. * - * @param uI + * @param ui * the UI to register as the current UI * * @see #getCurrent() @@ -735,6 +737,9 @@ public abstract class UI extends AbstractSingleComponentContainer implements * Gets the currently used UI. The current UI is automatically defined when * processing requests to the server. In other cases, (e.g. from background * threads), the current UI is not automatically defined. + * <p> + * The UI is stored using a weak reference to avoid leaking memory in case + * it is not explicitly cleared. * * @return the current UI instance if available, otherwise <code>null</code> * |