Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7723325
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 1, 20262026-06-01T04:24:53+00:00 2026-06-01T04:24:53+00:00

UPDATE: Seems to me like it is pretty much an Apple bug. I tried

  • 0

UPDATE:

Seems to me like it is pretty much an Apple bug. I tried the following:

  1. create a new single-window project
  2. create a single UIPickerView like the one shown below, only that the
    picker just allows for turning the dials. That is, neither variables
    nor any state is manipulated when interacting the picker.

RESULT: No matter whether I use the simple titleForRow:forComponent or viewForRow:forComponent, the picker still leaks 48 bytes each time a dial is turned. Further, I even tried having the picker return views previously allocated in an array set up as a class property in the viewController, so that no views are retained or released but for whatever the picker might do internally after or before it calls the delegate methods. And still, the leaks occur.

Seems like an Apple bug to me.

ORIGINAL QUESTION

I have a textField whose imputView is set to a UIPickerView with 4 components. The picker is used to select a weight / mass which becomes the text in the textField.

Under Instruments, each time I turn a dial / component in the UIPickerView, a leak occurs:

enter image description here
Here’s the stack trace for the 48 byte leak:

enter image description here

The code through which the UIPickerView gets each component view is:

- (UIView *)pickerView:(UIPickerView *)pickerView viewForRow:(NSInteger)row forComponent:(NSInteger)component reusingView:(UIView *)view
{
    if(!view)
    {
        view = [[[UILabel alloc] initWithFrame:CGRectMake(0, 0, 0, 37)] autorelease];
        UILabel *label = (UILabel*)view;
        label.autoresizingMask = UIViewAutoresizingFlexibleWidth;
        label.textAlignment = UITextAlignmentCenter;
        label.font = [UIFont boldSystemFontOfSize:24];
        label.backgroundColor = [UIColor clearColor];
    }

    ((UILabel*)view).text = [NSString stringWithFormat:@"%@%i", ((component == 3) ? @"." : @""), row];
    return view;
}

- (CGFloat)pickerView:(UIPickerView *)pickerView widthForComponent:(NSInteger)component
{
    return  60;
}

And the code that updates the textField to the new textual value is:

- (void)pickerView:(UIPickerView *)pickerView didSelectRow:(NSInteger)row inComponent:(NSInteger)component
{
    NSString *newWeight = [NSString stringWithFormat:@"%i%i%i.%i", 
                           [pickerView selectedRowInComponent:0], 
                           [pickerView selectedRowInComponent:1],
                           [pickerView selectedRowInComponent:2],
                           [pickerView selectedRowInComponent:3]];

    self.sampleMassBuffer = [NSDecimalNumber decimalNumberWithString:newWeight];
    weightTextField.text = [[numberFormatter stringFromNumber:self.sampleMassBuffer] stringByAppendingFormat:@" %@", currentConfiguration.weightUnits];
}

I have no idea how the leaks are originating or if they are even mine!
Could it be an Apple bug?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-01T04:24:54+00:00Added an answer on June 1, 2026 at 4:24 am

    The leak in the SDK. I just confirmed with a trusted source.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

UPDATE: I've been playing around with this more, and it seems like tmux's clear-history
I thought this should be pretty well documented, because it seems like a pretty
I have a pretty annoying problem. I would like to create a drawing program,
Update : The error seems to be generated by this line: *line = color;
-----UPDATE----- Well, seems that the problem was in last.id . When database is created
Update Solution Found See Bottom of post if interested Seems simple enough and for
Since recent update Xcode 4.3 now seems to default to LLDB debugger. I just
I want to update fontconfig to a newer version but it seems that the
Update: This is, as I was told, no principle Python related problem, but seems
The code seems not working. // $counter is an instance of Zend_Db_Table_Abstract $counter->update(array('hits' =>

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.