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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 13, 20262026-05-13T07:30:47+00:00 2026-05-13T07:30:47+00:00

I need your help, i’m stacked on this project. When i run my applicaion

  • 0

I need your help, i’m stacked on this project.


When i run my applicaion into Instruments, →← marked line giving memoryleak. When the fist run everything is ok but second time →← marked line giving memory leak, i didn’t understand why ?

I tried a lot of things, i used NSAutoReleasePool as well but result same.

Can someone help me pls ?

SBJSON *json = [[SBJSON alloc] init];
error = nil;
→ NSDictionary *results = [json objectWithString:response error:&error]; ←
[json release];
[response release];

NSArray *responsedNetworks = [results objectForKey:@”networks”];
NSMutableArray *serverResponse = [[NSMutableArray alloc] initWithArray:responsedNetworks];

Edit:
I uploaded my example application to this address : [removed][1] now, i’m sure that problem source isn’t delegate, but i don’t know where is the problem, I’m sure that Instruments shows wrong place for memory leak. I tried a lot of things can someone show me my mistake ?

Thank you

Edit 2:
Guys Unfortunately, i tried Clang static analyser,as i expected it gave a couple of warning into the some line of codes, I fixed these warnings.

Now, Instruments giving leak error, but Clang says there is not error into project.

Finally, My problem wasn’t gone.

Please download lastest example application and you can see with your eyes Here is the
EXAMPLE Project source.

How to see these leaks :
Open project and start to debug on the simulator (version doesn’t matter). Start debug, you will see info button top of the corner on the opened first window. Press and open it, after that close info window and open it again, at this point you should see Instrument’s leak messages. But Clang doesn’t give anything i mean everything is allright on Clang side.

I’m really confused ? what should i do ?

  • 1 1 Answer
  • 1 View
  • 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-13T07:30:48+00:00Added an answer on May 13, 2026 at 7:30 am

    Instruments does not indicate the line that causes the leak. It indicates the line that allocated memory that later was leaked. Just from the code given (which is obviously not the entire code), I’d suspect that you’re leaking serverResponse, which includes memory allocated in the line you’ve marked. Don’t just look at the line that Instruments gives you. What class is leaking? That will give as much hint as the line.

    Since you’re starting to have trouble with memory management, a suggestion: when you release something, always set it to nil. This will save you a lot of headache and crashes later. In this case I’m talking about json and response:

    [json release];
    json = nil;
    

    If you have Snow Leopard and Xcode 3.2, run the Analyzer (Cmd-Shift-A). It will find most common memory problems automatically.

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

Sidebar

Related Questions

I need your help to translate a query into pyes. This query is working
I need your help. I'm trying to install php_apc.dll into my php directory. So
I need your help on this guys!!!! During the upload of the files to
Need your help, trying to change this script: https://github.com/MrHus/jquery-monthly-ical To load external JSON data
I need your help to validate what is causing this error. This is the
Kindly need your help as this really taking me long time to try. From
I need your help. I am trying to import a C Dll into a
need your help!!! I tried looking for this but to no avail. How can
I need your help in this case: I have: 1 11 111 Cat1 a,b,c
I'm new to this ExpandableListView and I desperately need your help please. I'm using

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.