Fixes leaking ChatRoomWrapper instances as configuration listeners, will cause leaking xmpp connection instances.

cusax-fix
Damian Minkov 13 years ago
parent 64531283a2
commit e1e52c4a4d

@ -286,8 +286,16 @@ private void removeChatProvider(ChatRoomProviderWrapper chatRoomProvider,
}
for(int i = 0; i < chatRoomProvider.countChatRooms(); i++)
MUCActivator.getUIService().closeChatRoomWindow(
chatRoomProvider.getChatRoom(i));
{
ChatRoomWrapper wrapper = chatRoomProvider.getChatRoom(i);
MUCActivator.getUIService().closeChatRoomWindow(wrapper);
// clears listeners added by chat room
wrapper.removeListeners();
}
// clears listeners added by the system chat room
chatRoomProvider.getSystemRoomWrapper().removeListeners();
fireProviderWrapperRemoved(chatRoomProvider);
}

Loading…
Cancel
Save