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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 31, 20262026-05-31T02:38:09+00:00 2026-05-31T02:38:09+00:00

I am using the NSXMLParser and would like to release some of the objects

  • 0

I am using the NSXMLParser and would like to release some of the objects as soon as I am done with them in the parsing. However, I am not sure if that would mess up the automatic reference counting in IOS5 ? Is that a bad practice to release the objects asap in the code in IOS5 when you are done with them?

  • 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-31T02:38:10+00:00Added an answer on May 31, 2026 at 2:38 am

    Few things, one of them should be your answer:

    • in an ARC project you can’t call retain or release. A call to those methods will produce a compile time error, so you really cannot do any manual memory management any more.

    • on the other hand you can turn ARC on and off on a per file basis. That’s very easy to do- open the project settings, click on “build phases”, open the “compile sources” strip, then select the desired .m file and hit “enter” on the keyboard – in the popup window enter “-fno-objc-arc”. Close and re-start Xcode (they still have a bug with this, so … ). Now ARC is disabled for this file – you can use retain and release in the code and everything

    • however there’s also another way to go – use a release pool. In general if you are about to consume lot of memory and you wanted it released faster you should use a separate memory pool, it’s very easy to do that and the new iOS5 way looks like this:

    @autoreleasepool {
            // code code code code
    }
    

    So, all the allocations happening between the curly brackets will be released when you get out of the block – there you go 🙂

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

Sidebar

Related Questions

I am parsing some XML from an RSS feed (using NSXMLParser) for a blog
I was using UTF-8 encoded xml for parsing using NSXMLParser. But some of the
I am using NSXMLParser like this : - (BOOL)parseXMLData:(NSData *)inData { provisioningParser = [[NSXMLParser
I build a parsing algorithm using NSXMLParser. Im having doubt as to what is
Using TortoiseSVN against VisualSVN I delete a source file that I should not have
I'm using NSXMLParser to parse an rss feed. But I'm getting some strange behavior
When pasrsing XML using NSXMLParser, I encountered this problem when the parser received some
I'm parsing some HTML with NSXMLParser and it hits a parser error anytime it
Hello all I'm using NSXMLParser to parse some xml data. I'm using this data
I am currently using NSXMLParser mathods to parse my data something like this :

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.