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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 1, 20262026-06-01T01:19:14+00:00 2026-06-01T01:19:14+00:00

I am making a call to a database. After my call, I’ve found leaks

  • 0

I am making a call to a database. After my call, I’ve found leaks in NSString. Anybody have a solution to remove it?

 NSString *pic = [NSString stringWithUTF8String:(char *)sqlite3_column_text(selectStatement, 5)];

In above code, I found 90% leaks. I just read data from database.

  • 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-01T01:19:15+00:00Added an answer on June 1, 2026 at 1:19 am

    please explain the question well else others can’t identify your exact problem.

    I think you are you are assigning the value of [NSString stringWithUTF8String:(char *)sqlite3_column_text(selectStatement, 5)]; to your class object property.

    You can release the assigned class string property in the corresponding class dealloc method.Also set it nil.

    Example:

    if you are doing

    YourClass *classObj =[ YourClass  alloc] init];
    
    classObj.myStringvariable = [NSString stringWithUTF8String:(char *)sqlite3_column_text(selectStatement, 5)];
    

    the class structure will like

    @interface YourClass {
    
        NSString *myStringvariable ;
    
    }
    
    @property (nonatomic,retain)  NSString *myStringvariable ;
    

    .m file will be

    @synthesise myStringvariable ;
    
    
    -(void)init{
    
     myStringvariable  = @"";
    
    }
    
    -(void)dealloc{
    
     [myStringvariable  release];
     myStringvariable  = nil;
    }
    

    Check it.. this structure will not show memory leak.

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

Sidebar

Related Questions

I insert a record into the database by making an async AJAX call. After
We have an enterprise application where we are making a call to Database 1,
Suppose I'm making a JDBC call and I had fetched data from a database
I have a main page from where I am making a call to load
I'm making a database call with linq and it is returning some results to
I am making a call from a sql 2005 database to a sql 2000
Assume that my ASP.NET application is making 4 separate database calls. If after the
I am making a database call through the following parametrized query. set recordset =
I'm making call to Alfresco Webscripts which return JSON. I do this using GET
I am making a call to a web service, the results of the web

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.