Skip to content
Snippets Groups Projects
Commit 92900099 authored by srosse's avatar srosse
Browse files

OO-385: fix some leak of controllers

parent 7db84343
No related branches found
No related tags found
No related merge requests found
Showing
with 26 additions and 15 deletions
......@@ -77,7 +77,7 @@ public class ManageCalendarsController extends BasicController {
// Import calendar functionalities
importedCalendarConfig = new ImportedCalendarConfigurationController(importedCalendarWrappers, ureq, getWindowControl(), true);
importedCalendarConfig.addControllerListener(this);
listenTo(importedCalendarConfig);
manageVC.put("importedCalendarConfig", importedCalendarConfig.getInitialComponent());
manageVC.contextPut("importedCalendarWrappers", importedCalendarWrappers);
......
......@@ -247,7 +247,7 @@ public class WeeklyCalendarController extends BasicController implements Activat
vcMain.put("calendarConfig", calendarConfig.getInitialComponent());
importedCalendarConfig = new ImportedCalendarConfigurationController(importedCalendarWrappers, ureq, getWindowControl(), false);
importedCalendarConfig.addControllerListener(this);
listenTo(importedCalendarConfig);
vcMain.put("importedCalendarConfig", importedCalendarConfig.getInitialComponent());
// calendar subscription
......
......@@ -162,6 +162,8 @@ public class ContextHelpTopNavController extends FormBasicController {
* @see org.olat.core.gui.control.DefaultController#doDispose()
*/
protected void doDispose() {
// nothing to dispose
if(searchController != null) {
searchController.dispose();
}
}
}
......@@ -36,6 +36,7 @@ import org.olat.core.gui.UserRequest;
import org.olat.core.gui.components.Component;
import org.olat.core.gui.components.panel.Panel;
import org.olat.core.gui.components.velocity.VelocityContainer;
import org.olat.core.gui.control.generic.portal.PortalImpl;
import org.olat.core.gui.translator.Translator;
import org.olat.core.id.OLATResourceable;
import org.olat.core.id.context.BusinessControlFactory;
......@@ -494,5 +495,6 @@ public abstract class DefaultController implements Controller, ControllerEventLi
*/
protected void setDisposedMsgController(Controller disposeMsgController) {
disposedMessageController = disposeMsgController;
controllerCnt.decrementAndGet();
}
}
\ No newline at end of file
......@@ -78,7 +78,7 @@ public class IFrameDisplayController extends BasicController implements GenericE
/**
* Base URI of contentMapper
*/
private String baseURI;
private final String baseURI;
/**
* Relative uri of currently loaded page in iframe
*/
......@@ -166,8 +166,7 @@ public class IFrameDisplayController extends BasicController implements GenericE
null /*g_encoding*/, null /*jsEncoding*/, null /*contentEncoding*/,
frameId, null /*customCssURL*/, themeBaseUri, null /*customHeaderContent*/,
staticFilesPath, mapPathGlossar);
String baseURI;
String mapperID = VFSManager.getRealPath(rootDir);
if (mapperID == null) {
// can't cache mapper, no cacheable context available
......
......@@ -202,6 +202,7 @@ public class PortalImpl extends DefaultController implements Portal, ControllerE
// discard invalid portlet names
}
}
dispose();
return new PortalImpl(this.name, ureq, wContr, cleanedUserColumns);
}
......@@ -408,9 +409,9 @@ public class PortalImpl extends DefaultController implements Portal, ControllerE
*/
protected void doDispose() {
// cleanup all portlet containers
Iterator iter = portletContainers.values().iterator();
Iterator<PortletContainer> iter = portletContainers.values().iterator();
while (iter.hasNext()) {
PortletContainer element = (PortletContainer) iter.next();
PortletContainer element = iter.next();
element.dispose();
}
portletContainers = null;
......
......@@ -83,12 +83,6 @@ public class WindowManagerImpl extends BasicManager implements WindowManager {
private PopupBrowserWindowControllerCreator pbwcc;
// global urls for mapped path e.g. for css, js and so on; for all users!
private static Map<String,String> mappedPaths = new HashMap<String, String>();
public WindowManagerImpl() {
this.pbwcc = (PopupBrowserWindowControllerCreator)
......
......@@ -48,14 +48,17 @@ public class GroupMembersDisplayController extends BasicController {
if(members.isOwnersPublic()) {
GroupController groupOwnersController = new GroupController(ureq, wControl, false, true, false, false, false, businessGroup.getOwnerGroup());
content.put("owners", groupOwnersController.getInitialComponent());
listenTo(groupOwnersController);
}
if(members.isParticipantsPublic()) {
GroupController groupParticipantsController = new GroupController(ureq, wControl, false, true, false, false, false, businessGroup.getPartipiciantGroup());
content.put("participants", groupParticipantsController.getInitialComponent());
listenTo(groupParticipantsController);
}
if(members.isWaitingListPublic()) {
GroupController groupWaitingListController = new GroupController(ureq, wControl, false, true, false, false, false, businessGroup.getWaitingGroup());
content.put("waitingList", groupWaitingListController.getInitialComponent());
listenTo(groupWaitingListController);
}
putInitialPanel(content);
}
......
......@@ -182,6 +182,9 @@ public class OlatTopNavController extends BasicController implements GenericEven
if (singleUserEventCenter != null) {
singleUserEventCenter.deregisterFor(this, ass);
}
if(searchC != null) {
searchC.dispose();
}
}
@Override
......
......@@ -119,7 +119,10 @@ public class HomePortalControllerCreator extends AutoCreator {
@Override
protected void doDispose() {
//
if (myPortal != null) {
myPortal.dispose();
myPortal = null;
}
}
@Override
......
......@@ -126,6 +126,7 @@ public class AfterLoginInterceptionController extends BasicController {
if(loginInterceptor.isInterceptionRequired(ureq)) {
mapInfos.put(CONTROLLER, ctrl);
} else {
ctrl.dispose();
mapInfosIt.remove();
}
} else if (ctrl != null ){
......@@ -148,6 +149,7 @@ public class AfterLoginInterceptionController extends BasicController {
wiz = new WizardInfoController(ureq, aftctrls.size());
vC.put("wizard", wiz.getInitialComponent());
vC.contextPut("ctrlCount", aftctrls.size());
listenTo(wiz);
// get first Ctrl into Wizard
putControllerToPanel(ureq, wControl, 0);
......
......@@ -119,6 +119,7 @@ public class CPDisplayController extends BasicController implements Activateable
SearchServiceUIFactory searchServiceUIFactory = (SearchServiceUIFactory)CoreSpringFactory.getBean(SearchServiceUIFactory.class);
searchCtrl = searchServiceUIFactory.createInputController(ureq, wControl, DisplayOption.BUTTON, null);
myContent.put("search_input", searchCtrl.getInitialComponent());
listenTo(searchCtrl);
}
//TODO:gs:a
......
......@@ -107,6 +107,7 @@ public class PersonalSettingsController extends BasicController implements Activ
if(WebDAVManager.getInstance().isEnabled()) {
pwdav = new WebDAVPasswordController(ureq, getWindowControl());
userConfig.addTab(translate("tab.pwdav"), pwdav.getInitialComponent());
listenTo(pwdav);
}
if(InstantMessagingModule.isEnabled()){
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment