RoomViewController: Dispose members list resources on back pressed.

This commit is contained in:
giomfo
2015-05-18 10:29:56 +02:00
parent 2f561c6e00
commit 7d413146fb
@@ -109,10 +109,22 @@
}
if (pushedViewController) {
// Force the pushed view controller to dispose its resources, and release associated data source if any.
MXKDataSource *dataSource;
if ([pushedViewController isKindOfClass:[MXKRoomMemberListViewController class]]) {
dataSource = [(MXKRoomMemberListViewController*)pushedViewController dataSource];
}
if ([pushedViewController respondsToSelector:@selector(destroy)]) {
[pushedViewController destroy];
}
pushedViewController = nil;
if (dataSource) {
[dataSource destroy];
}
}
}