mirror of
https://gitlab.opencode.de/bwi/bundesmessenger/clients/bundesmessenger-ios.git
synced 2026-04-29 20:56:57 +02:00
RoomViewController: Dispose members list resources on back pressed.
This commit is contained in:
@@ -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];
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user