Results 1 to 2 of 2
Discuss UITabBarController and memory issues. at the Offical Apple iPhone SDK - Hackint0sh.org; Hello, I'm using a tabbarcontroller which i create programatically, when i release the controller without ...
  1. #1
    Newbie Array

    Join Date
    Dec 2008
    Posts
    1
    Post Thanks / Like
    Downloads
    0
    Uploads
    0
    Rep Power
    0

    Default UITabBarController and memory issues.

    Hello,



    I'm using a tabbarcontroller which i create programatically, when i release the controller without touch any tabitem dealloc works great and all viewcontrollers are deallocated. If i touch some tabBarItem after the realese, tabbarcontroller doesn't release viewcontrollers.

    There is a small example similar to what i'm doing.

    Definition:

    Code:
    @property (assign, nonatomic) UITabBarController *tbController;
    Alloc:

    Code:
        NSMutableArray *tbControllers = [[NSMutableArray alloc] initWithCapacity:3];
    
        View1 *view1 = [[View1 alloc] init];
        view1.tabBarItem.title = @"1";
        [tbControllers addObject:view1];
        [view1 release];
    
        View2 *view2 = [[View2 alloc] init];
        view2.tabBarItem.title = @"1";
        [tbControllers addObject:view2];
        [view2 release];
        
        self.tbController = [[UITabBarController alloc] init];
        tbController.viewControllers = tbControllers;
        tbController.view.frame = CGRectMake(0,0, 320, 320);
        [tbControllers release];
        [self.view addSubview:tbController.view];
    Dealloc:

    Code:
         [tbController release];
    View1 is an empty UIViewController with a debug output in viewDidLoad and dealloc. View2 too.

    Code:
    - (void)viewDidLoad {
         NSLog(@"INIT view1");
         [super viewDidLoad];
    }
    
    - (void)dealloc {
         NSLog(@"DEALLOCING 1");
         [super dealloc];
    }
    I'm missing something or there is a bug?.


  2. #2
    Newbie Array

    Join Date
    Jan 2009
    Posts
    1
    Post Thanks / Like
    Downloads
    0
    Uploads
    0
    Rep Power
    0

    Default

    Im having the exact same issue. did you figure this one out?

 

 

Similar Threads

  1. Replies: 0
    Last Post: 02-11-2011, 03:20 AM
  2. Replies: 0
    Last Post: 07-01-2010, 10:00 AM
  3. Replies: 0
    Last Post: 02-16-2010, 06:20 PM
  4. Replies: 0
    Last Post: 02-02-2010, 04:50 AM
  5. memory issues
    By odysseus in forum iPhone OS 3.x
    Replies: 2
    Last Post: 09-17-2009, 01:22 AM

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Powered by vBulletin®
Copyright © 2013 vBulletin Solutions, Inc. All rights reserved.
Search Engine Friendly URLs by vBSEO
(c) 2006-2012 Hackint0sh.org
All times are GMT +2. The time now is 02:35 AM.
twitter, follow us!