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-22 06:46:10 +0000 |
commit | a4e06d3efcd4423f364f01de6f0cd3af1b3a0745 (patch) | |
tree | 0e77fa616a5612bc288715e729524f89087959b8 /server/src/com/vaadin/ui/UI.java | |
parent | 222876bc4057366c63060984c577bbbfb1cc3145 (diff) | |
download | vaadin-framework-a4e06d3efcd4423f364f01de6f0cd3af1b3a0745.tar.gz vaadin-framework-a4e06d3efcd4423f364f01de6f0cd3af1b3a0745.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> * |