mirror of
https://gitlab.linphone.org/BC/public/linphone-iphone.git
synced 2026-01-24 06:38:08 +00:00
No memory leak when deleting a contact
This commit is contained in:
parent
425fc8af0a
commit
73fd1837f5
1 changed files with 5 additions and 0 deletions
|
|
@ -349,6 +349,8 @@ static int ms_strcmpfuz(const char *fuzzy_word, const char *sentence) {
|
|||
[tableView deleteSections:[NSIndexSet indexSetWithIndex:indexPath.section]
|
||||
withRowAnimation:UITableViewRowAnimationFade];
|
||||
}
|
||||
UIContactCell* cell = [self.tableView cellForRowAtIndexPath:indexPath];
|
||||
[cell setContact:NULL];
|
||||
[[LinphoneManager.instance fastAddressBook] removeContact:contact];
|
||||
[tableView deleteRowsAtIndexPaths:[NSArray arrayWithObject:indexPath]
|
||||
withRowAnimation:UITableViewRowAnimationFade];
|
||||
|
|
@ -358,6 +360,7 @@ static int ms_strcmpfuz(const char *fuzzy_word, const char *sentence) {
|
|||
selector:@selector(onAddressBookUpdate:)
|
||||
name:kLinphoneAddressBookUpdate
|
||||
object:nil];
|
||||
[self loadData];
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -372,6 +375,8 @@ static int ms_strcmpfuz(const char *fuzzy_word, const char *sentence) {
|
|||
if (subAr.count == 0) {
|
||||
[addressBookMap removeObjectForKey:firstChar];
|
||||
}
|
||||
UIContactCell* cell = [self.tableView cellForRowAtIndexPath:indexPath];
|
||||
[cell setContact:NULL];
|
||||
[[LinphoneManager.instance fastAddressBook] removeContact:contact];
|
||||
|
||||
[NSNotificationCenter.defaultCenter addObserver:self
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue