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 8285721
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 8, 20262026-06-08T11:32:19+00:00 2026-06-08T11:32:19+00:00

I just ran the Leaks tool in Instruments and discovered the following leaks: basically

  • 0

I just ran the Leaks tool in Instruments and discovered the following leaks:

enter image description here

basically it’s pointing out to drawRect in NIAttributedLabel, so I double clicked the drawRect method and here’s what I have:

How do I then eliminate this leak?
enter image description here

Here’s some code:

dispatch_async(dispatch_get_global_queue(DISPATCH_QUEUE_PRIORITY_HIGH, 0), ^{

            NSString *commentsText = [NSString stringWithFormat:@"%@ %@", self.imageComment_.username_, self.imageComment_.text_];

            NSRange range;
            range.location = 0;
            range.length = commentsText.length;

            NSMutableAttributedString* attrStr = [[NSMutableAttributedString alloc] initWithString:commentsText];
            [attrStr setFont:[UIFont fontWithName:@"HelveticaNeue" size:14] range:range];
            self.commentAttributedString_ = attrStr;
            [attrStr release];


            dispatch_async(dispatch_get_main_queue(), ^{
                [weakSelf.commentsText_ setAlpha:0.0];
                [weakSelf.commentsPostedTime_ setAlpha:0.0];
                [weakSelf.commentsText_ setFrameWidth:weakSelf.contentView.frameWidth - weakSelf.profilePicture_.frameWidth - kCommentsPadding];
                [weakSelf.commentsText_ setFrameHeight:weakSelf.imageComment_.commentHeight_ - 30];
                [weakSelf.commentsText_ setAttributedString:weakSelf.commentAttributedString_];
                [weakSelf.commentsText_ setLinkColor:weakSelf.textColor_];

                NSString *timePosted = [NSString timestampToString:weakSelf.imageComment_.createdTime_];
                CGSize commentsTimeSize = [timePosted sizeWithFont:weakSelf.commentsPostedTime_.font constrainedToSize:CGSizeMake(weakSelf.commentsText_.frameWidth, 50)];
                [weakSelf.commentsPostedTime_ setText:timePosted];
                [weakSelf.commentsPostedTime_ setFrameWidth:commentsTimeSize.width];
                [weakSelf.commentsPostedTime_ setFrameHeight:commentsTimeSize.height];
                [weakSelf.commentsPostedTime_ setFrameY:weakSelf.commentsText_.frameY + weakSelf.commentsText_.frameHeight];
                [weakSelf.commentsPostedTime_ setFrameX:weakSelf.commentsText_.frameX];

                [UIView animateWithDuration:0.3 animations:^{
                    [weakSelf.commentsText_ setAlpha:1.0];
                    [weakSelf.commentsPostedTime_ setAlpha:1.0];
                } completion:^(BOOL finished){
                    [weakSelf parseTagsInComment];
                }];
            });

        });
  • 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-08T11:32:19+00:00Added an answer on June 8, 2026 at 11:32 am

    If you are using Nimbus on the latest master then you must enable ARC or you will get memory leaks.

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

Sidebar

Related Questions

Is there any. I just ran the new perf analysis tool of vs2010 and
I just ran across the following syntax in a piece of Haskell code -
Ok, so I'm just learning about memory leaks. I ran Valgrind to find memory
I ran a leaks report on a program I am developing, with the following
Time for a theoretical question I just ran across. The following code is valid
I just ran into this issue while making a GET request to a node.js
I just ran into a problem with the version of JAX-WS in JDK 1.6.0
I just ran across a question with an answer suggesting the AntiXss library to
I just ran across an issue that probably exposes my ignorance of common threading
I just ran into a SQL query with about 5 different columns in the

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.