aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTeemu Suo-Anttila <tsuoanttila@users.noreply.github.com>2018-06-27 14:25:15 +0300
committerTeemu Suo-Anttila <tsuoanttila@users.noreply.github.com>2018-07-04 11:41:36 +0300
commita2457b2f2357bbdb32b184e25ddd49698efc800e (patch)
tree71f040f02a65b46c9be72f4a4250705dc0bcc986
parentd69d6862dce3e4801067362d9b453de92c254abc (diff)
downloadvaadin-framework-a2457b2f2357bbdb32b184e25ddd49698efc800e.tar.gz
vaadin-framework-a2457b2f2357bbdb32b184e25ddd49698efc800e.zip
Memory leak fix in ConnectorTracker (#10996)
-rw-r--r--server/src/main/java/com/vaadin/ui/ConnectorTracker.java3
-rw-r--r--server/src/main/java/com/vaadin/ui/Upload.java4
2 files changed, 6 insertions, 1 deletions
diff --git a/server/src/main/java/com/vaadin/ui/ConnectorTracker.java b/server/src/main/java/com/vaadin/ui/ConnectorTracker.java
index 0c331ae8ee..de7935d9fb 100644
--- a/server/src/main/java/com/vaadin/ui/ConnectorTracker.java
+++ b/server/src/main/java/com/vaadin/ui/ConnectorTracker.java
@@ -869,7 +869,8 @@ public class ConnectorTracker implements Serializable {
}
Map<String, StreamVariable> nameToStreamVar = pidToNameToStreamVariable
.get(connectorId);
- nameToStreamVar.remove(variableName);
+ StreamVariable streamVar = nameToStreamVar.remove(variableName);
+ streamVariableToSeckey.remove(streamVar);
if (nameToStreamVar.isEmpty()) {
pidToNameToStreamVariable.remove(connectorId);
}
diff --git a/server/src/main/java/com/vaadin/ui/Upload.java b/server/src/main/java/com/vaadin/ui/Upload.java
index 7f5727f078..ca9f2dc7f0 100644
--- a/server/src/main/java/com/vaadin/ui/Upload.java
+++ b/server/src/main/java/com/vaadin/ui/Upload.java
@@ -1118,6 +1118,8 @@ public class Upload extends AbstractComponent
fireUploadSuccess(event.getFileName(), event.getMimeType(),
event.getContentLength());
endUpload();
+ if(lastStartedEvent != null)
+ lastStartedEvent.disposeStreamVariable();
}
@Override
@@ -1136,6 +1138,8 @@ public class Upload extends AbstractComponent
}
} finally {
endUpload();
+ if(lastStartedEvent != null)
+ lastStartedEvent.disposeStreamVariable();
}
}
};