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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 6, 20262026-06-06T14:46:48+00:00 2026-06-06T14:46:48+00:00

I have been working with iPhone application in which i am using sqlite database.

  • 0

I have been working with iPhone application in which i am using sqlite database. I have checked memory leak in iPad,iPhone 4 and there is no memory leaks. But same code show memory leak in iPhone-3GS. Please take a look at below scree-shot and i think there is no leak than after instruments showing me leaks. Please do advice me.

Thanks in Advance.

enter image description here

  • 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-06T14:46:49+00:00Added an answer on June 6, 2026 at 2:46 pm

    Its actually not that strange, see how you allocate memory for both Query and Query1 via [[NSArray alloc] init. But then, you overwrite the pointer of them by calling [database executeQuery:], so the allocated memory is leaked.

    It looks like you don’t really need the array allocation anyway, so you can simply remove that line. However, that the [Query release] and [Query1 release] doesn’t crash the app (or at least at some later point), indicates that [database executeQuery:] return retained memory and thus delegates its ownership to the caller, which is discouraged by the memory guidelines. You should return an autoreleased object from executeQuery: and because you never use the returned value, you can simply reduce the method down to:

    [self databaseOpen];
    [database executeQuery:@"Delete from ActivityList"];
    [database executeQuery:@"Select* from ActivityList"];
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

So far I have been working on Iphone applications which use SOAP service to
Here's a tricky iPhone problem I've been working on. I have three UIScrollViews on
I have been working on an iPhone project, where we created all the user
I have been working on an iphone apps for several weeks. Now I encounter
I have been working on an iPhone app that has a feature of uploading
I have been working with iPhone app as developer and now my PM(Project Manager)
I have been working on an iPhone app, where-in i have list of users
I've been working on iPhone application for quite a while now, and, I've came
I have been working on an iPhone App for a couple of weeks now
Greetings , I am a new developer in BlackBerry Application. I have been working

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.