From dd0cc7889d87a9437c7ff6cdf4e23eafdc9b2ee8 Mon Sep 17 00:00:00 2001
From: srosse <none@none>
Date: Thu, 17 Jul 2014 10:19:25 +0200
Subject: [PATCH] OO-1068: fix memory leak ( the dispose chain of controller is
 broken for the ajax controller )

---
 .../fullWebApp/BaseFullWebappController.java  | 21 +++++++++++++++++++
 1 file changed, 21 insertions(+)

diff --git a/src/main/java/org/olat/core/commons/fullWebApp/BaseFullWebappController.java b/src/main/java/org/olat/core/commons/fullWebApp/BaseFullWebappController.java
index 137c98ebd4b..26acd9f4844 100644
--- a/src/main/java/org/olat/core/commons/fullWebApp/BaseFullWebappController.java
+++ b/src/main/java/org/olat/core/commons/fullWebApp/BaseFullWebappController.java
@@ -664,6 +664,27 @@ public class BaseFullWebappController extends BasicController implements ChiefCo
 		myWindow.setDTabs(null);
 
 		getWindowControl().getWindowBackOffice().removeCycleListener(this);
+		
+		if (jsServerC != null) {
+			jsServerC.dispose();
+			jsServerC = null;
+		}
+		if (debugC != null) {
+			debugC.dispose();
+			debugC = null;
+		}
+		if (inlineTranslationC != null) {
+			inlineTranslationC.dispose();
+			inlineTranslationC = null;
+		}
+		if (developmentC != null) {
+			developmentC.dispose();
+			developmentC = null;
+		}
+		if (jsLoggerC != null) {
+			jsLoggerC.dispose();
+			jsLoggerC = null;
+		}
 	}
 
 	private void setGuiStack(GuiStack guiStack) {
-- 
GitLab