Merge pull request #1121 from florianholzapfel/master
fix for some memory leaks on the iOS client
This commit is contained in:
commit
b502132bf6
@ -19,7 +19,7 @@
|
||||
// set title and tab-bar image
|
||||
[self setTitle:NSLocalizedString(@"About", @"About Controller title")];
|
||||
UIImage* tabBarIcon = [UIImage imageWithContentsOfFile:[[NSBundle mainBundle] pathForResource:@"tabbar_icon_about" ofType:@"png"]];
|
||||
[self setTabBarItem:[[UITabBarItem alloc] initWithTitle:NSLocalizedString(@"About", @"Tabbar item about") image:tabBarIcon tag:0]];
|
||||
[self setTabBarItem:[[[UITabBarItem alloc] initWithTitle:NSLocalizedString(@"About", @"Tabbar item about") image:tabBarIcon tag:0] autorelease]];
|
||||
|
||||
last_link_clicked = nil;
|
||||
}
|
||||
|
@ -27,7 +27,7 @@
|
||||
if ((self = [super initWithStyle:style]))
|
||||
{
|
||||
UIImage* tabBarIcon = [UIImage imageWithContentsOfFile:[[NSBundle mainBundle] pathForResource:@"tabbar_icon_settings" ofType:@"png"]];
|
||||
[self setTabBarItem:[[UITabBarItem alloc] initWithTitle:NSLocalizedString(@"Settings", @"Tabbar item settings") image:tabBarIcon tag:0]];
|
||||
[self setTabBarItem:[[[UITabBarItem alloc] initWithTitle:NSLocalizedString(@"Settings", @"Tabbar item settings") image:tabBarIcon tag:0] autorelease]];
|
||||
}
|
||||
return self;
|
||||
}
|
||||
|
@ -59,7 +59,7 @@
|
||||
|
||||
// set title and tabbar controller image
|
||||
[self setTitle:NSLocalizedString(@"Connections", @"'Connections': bookmark controller title")];
|
||||
[self setTabBarItem:[[UITabBarItem alloc] initWithTabBarSystemItem:UITabBarSystemItemBookmarks tag:0]];
|
||||
[self setTabBarItem:[[[UITabBarItem alloc] initWithTabBarSystemItem:UITabBarSystemItemBookmarks tag:0] autorelease]];
|
||||
|
||||
// load images
|
||||
_star_on_img = [[UIImage imageWithContentsOfFile:[[NSBundle mainBundle] pathForResource:@"icon_accessory_star_on" ofType:@"png"]] retain];
|
||||
@ -151,6 +151,9 @@
|
||||
[_manual_search_result release];
|
||||
[_manual_bookmarks release];
|
||||
[_tsxconnect_bookmarks release];
|
||||
|
||||
[_star_on_img release];
|
||||
[_star_off_img release];
|
||||
|
||||
[super dealloc];
|
||||
}
|
||||
@ -451,7 +454,7 @@
|
||||
{
|
||||
// resume session
|
||||
RDPSession* session = [_active_sessions objectAtIndex:[indexPath row]];
|
||||
UIViewController* ctrl = [[RDPSessionViewController alloc] initWithNibName:@"RDPSessionView" bundle:nil session:session];
|
||||
UIViewController* ctrl = [[[RDPSessionViewController alloc] initWithNibName:@"RDPSessionView" bundle:nil session:session] autorelease];
|
||||
[ctrl setHidesBottomBarWhenPushed:YES];
|
||||
[[self navigationController] pushViewController:ctrl animated:YES];
|
||||
}
|
||||
@ -466,7 +469,8 @@
|
||||
if ([[_searchBar text] length] == 0)
|
||||
{
|
||||
// show add bookmark controller
|
||||
BookmarkEditorController* bookmarkEditorController = [[[BookmarkEditorController alloc] initWithBookmark:[[ComputerBookmark alloc] initWithBaseDefaultParameters]] autorelease];
|
||||
ComputerBookmark *bookmark = [[[ComputerBookmark alloc] initWithBaseDefaultParameters] autorelease];
|
||||
BookmarkEditorController* bookmarkEditorController = [[[BookmarkEditorController alloc] initWithBookmark:bookmark] autorelease];
|
||||
[bookmarkEditorController setTitle:NSLocalizedString(@"Add Connection", @"Add Connection title")];
|
||||
[bookmarkEditorController setDelegate:self];
|
||||
[bookmarkEditorController setHidesBottomBarWhenPushed:YES];
|
||||
@ -509,7 +513,7 @@
|
||||
{
|
||||
// create rdp session
|
||||
RDPSession* session = [[[RDPSession alloc] initWithBookmark:bookmark] autorelease];
|
||||
UIViewController* ctrl = [[RDPSessionViewController alloc] initWithNibName:@"RDPSessionView" bundle:nil session:session];
|
||||
UIViewController* ctrl = [[[RDPSessionViewController alloc] initWithNibName:@"RDPSessionView" bundle:nil session:session] autorelease];
|
||||
[ctrl setHidesBottomBarWhenPushed:YES];
|
||||
[[self navigationController] pushViewController:ctrl animated:YES];
|
||||
[_active_sessions addObject:session];
|
||||
|
@ -19,7 +19,7 @@
|
||||
// set title and tab-bar image
|
||||
[self setTitle:NSLocalizedString(@"Help", @"Help Controller title")];
|
||||
UIImage* tabBarIcon = [UIImage imageWithContentsOfFile:[[NSBundle mainBundle] pathForResource:@"tabbar_icon_help" ofType:@"png"]];
|
||||
[self setTabBarItem:[[UITabBarItem alloc] initWithTitle:NSLocalizedString(@"Help", @"Tabbar item help") image:tabBarIcon tag:0]];
|
||||
[self setTabBarItem:[[[UITabBarItem alloc] initWithTitle:NSLocalizedString(@"Help", @"Tabbar item help") image:tabBarIcon tag:0] autorelease]];
|
||||
}
|
||||
return self;
|
||||
}
|
||||
|
@ -51,6 +51,7 @@
|
||||
if (ret)
|
||||
{
|
||||
NSLog(@"%s: CCKeyDerivationPBKDF ret == %d, indicating some sort of failure.", __func__, ret);
|
||||
free(derived_key);
|
||||
[self autorelease];
|
||||
return nil;
|
||||
}
|
||||
@ -64,6 +65,7 @@
|
||||
if (ret != 1)
|
||||
{
|
||||
NSLog(@"%s: PKCS5_PBKDF2_HMAC_SHA1 ret == %lu, indicating some sort of failure.", __func__, ret);
|
||||
free(derived_key);
|
||||
[self release];
|
||||
return nil;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user