From 50cf044b46bf24f72f0a66f9fd9ed10f7808d2e8 Mon Sep 17 00:00:00 2001 From: Pierre-Eric Pelloux-Prayer Date: Thu, 12 Jan 2012 15:22:28 +0100 Subject: [PATCH] Fix memleaks --- Classes/CallHistoryTableViewController.m | 6 +++++- Classes/PhoneViewController.m | 2 +- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/Classes/CallHistoryTableViewController.m b/Classes/CallHistoryTableViewController.m index 13d07f9c3..eb1b56446 100644 --- a/Classes/CallHistoryTableViewController.m +++ b/Classes/CallHistoryTableViewController.m @@ -196,10 +196,14 @@ } else { phoneNumber = [[NSString alloc] initWithCString:linphone_address_as_string_uri_only(partyToCall) encoding:[NSString defaultCStringEncoding]]; } + + NSString* dispName = [[NSString alloc] initWithCString:displayName encoding:[NSString defaultCStringEncoding]]; + [[LinphoneManager instance].callDelegate displayDialerFromUI:self forUser:phoneNumber - withDisplayName:[[[NSString alloc] initWithCString:displayName encoding:[NSString defaultCStringEncoding]] autorelease]]; + withDisplayName:dispName]; [phoneNumber release]; + [dispName release]; } diff --git a/Classes/PhoneViewController.m b/Classes/PhoneViewController.m index a99cfe838..979b1f104 100644 --- a/Classes/PhoneViewController.m +++ b/Classes/PhoneViewController.m @@ -204,7 +204,7 @@ [[UIApplication sharedApplication] presentLocalNotificationNow:notif]; } } else { - CallDelegate* cd = [[CallDelegate alloc] init]; + CallDelegate* cd = [[[CallDelegate alloc] init] autorelease]; cd.delegate = self; cd.call = call;