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

  • Home
  • SEARCH
  • 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 6047773
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 23, 20262026-05-23T07:23:17+00:00 2026-05-23T07:23:17+00:00

For a view in my iPhone application, I am using a subclass of the

  • 0

For a view in my iPhone application, I am using a subclass of the ABTableViewCell (https://github.com/enormego/ABTableViewCell). It’s a fairly simple cell, but I wanted to use this for the scrolling speed I need, because a lot of them can in the table at once.

Here is the header of the file:

@interface WHUserTableViewCell : ABTableViewCell {

    NSString* Name;
    NSString* DetailsText;
    UIImage*  UserImage;

}

@property (nonatomic, copy) NSString* Name;
@property (nonatomic, copy) NSString* DetailsText;
@property (nonatomic, copy) UIImage* UserImage;

I know that by using ‘copy’ on an image, I am only supporting iOS 4.2 and up, but that is something I might fix later.

I follow the way AteBits uses this cell, by creating custom set methods for the properties, like this:

- (void) setUserImage:(UIImage *) userImage
{
    [UserImage release];
    UserImage = [userImage copy];
    [self setNeedsDisplay];
}

- (void) setName:(NSString *) name
{
    [Name release];
    Name = [name copy];
    [self setNeedsDisplay];
}

- (void) setDetailsText:(NSString *) detailsText
{
    [DetailsText release];
    DetailsText = [detailsText copy];
    [self setNeedsDisplay];
}

The images that are assigned to the ‘UserImage’ property, are coming from a Singleton class, which provides caching and downloading of the images. So that class should be the ‘owner’ of the images.

There is only one problem, once the cell deallocs, and I release all the properties the application crashes on the [UserImage release] line, here’s my dealloc method:

- (void)dealloc
{
    [super dealloc];

    [UserImage release];
    [Name release];
    [DetailsText release];
}

This cell uses custom drawing, just like AteBits explains in his famous blog post about this. What is the correct and fastest way to handle images for this. I would like to continue using my singleton caching/downloading class to handle images, but I don’t think that is the source of the problem, since I am copying the image objects.

  • 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-05-23T07:23:18+00:00Added an answer on May 23, 2026 at 7:23 am

    [super dealloc]; should be the last line of - (void)dealloc.

    Related: Why do I have to call super -dealloc last, and not first?

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

Sidebar

Related Questions

Developing iphone application using makkit framework. I have got the map view integrated in
I want to read my current location using Map view in my iPhone application.
I have an iPhone application where i'm showing a settings page using modal view
I am using iAd in my iphone 4.0 application but after adding the ADBannerView
I am using this http://imthi.com/blog/programming/iphone-rss-reader-application-with-source-code.php as a start for my rss reader in my
i want to create login form using sqlite in iphone view based application please
I used UItableview in my iPhone application. I move to next view using Tableviewcell
In my iPhone application I have a table view. When user taps any row,
I have created an iPhone application based on an OpenGL view. Now I would
i am developing a iphone application in a view-based project,(not navigation) however i would

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.