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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T18:26:41+00:00 2026-05-26T18:26:41+00:00

Either I don’t understand the Instruments Leaks tool at all, or I am going

  • 0

Either I don’t understand the Instruments Leaks tool at all, or I am going mad. I have run the tool on my iphone app, and it shows a couple of leaks. If I understand it correctly, for one of the leaks, it says that it is an NSDate object allocated by my method “writeHeading”. The method that allocates the object is: “dateWithTimeIntervalSinceReferenceDate:”. However, my writeHeading method does not use that method. In fact, that method is not used anywhere in my whole application.

Does anybody have an idea what could be going on here?

Here is the code of writeHeading:

- (void) writeHeading:(CLHeading *)heading
{
    if (self.inFlight) {
        [log writeHeading:heading];
    } else {
        IGC_Event *event = [[IGC_Event alloc] init];
        event.code = 'K';
        event.timestamp = heading.timestamp;    
        event.heading = heading;
        [self addEvent:event];
        [event release];
    }
}

Here is a screenshot of Instruments:
enter image description here

And here is the definition of IGC_Event (as asked by multiple responders):

@interface IGC_Event : NSObject {
    int code;
    CLLocation *location;
    CLHeading *heading;
    NSString *other;
    NSDate *timestamp;
}

@property int code;
@property (nonatomic, retain) CLLocation *location;
@property (nonatomic, retain) CLHeading *heading;
@property (nonatomic, retain) NSString *other;
@property (nonatomic, retain) NSDate *timestamp;

@end


@implementation IGC_Event

@synthesize code;
@synthesize location;
@synthesize heading;
@synthesize other;
@synthesize timestamp;

@end
  • 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-26T18:26:41+00:00Added an answer on May 26, 2026 at 6:26 pm

    Assuming no ARC, you need to make sure IGC_Event objects release their timestamp and other references that may have been retained or copied.

    So in IGC_Event you need a dealloc something like this:

    - (void) dealloc {
    
        [timestamp release];
        [location release];
        [heading release];
        [other release];
    
    
        [super dealloc];
    }
    

    Leaks is just telling you where that timestamp object was created, not where you should have released it.

    That may not be the only place you are leaking of course, but that’s 4 potential leaks right there.

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

Sidebar

Related Questions

I don't know anything about either library but I have to choose one of
I'd like to query a mongo collection for records which either don't have a
This is giving me headaches, AGAIN. I either don't understand this ajax response stuff
I have certain page-specific js and css files that I either: Don't want running
I've poked around on stackoverflow for a while, but either I don't understand templates
I've looked at several other SGen-related questions on here and either their answers don't
I don't see the point of using either http://960.gs or http://blueprintcss.org if they enforce
I'm either a bit overwhelmed by the complexity of NSDate or I simply don't
I am working on an iOS app that needs to post to either Twitter,
I don't really need to disable them because I either disable the TabControl or

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.