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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 8, 20262026-06-08T00:57:48+00:00 2026-06-08T00:57:48+00:00

I’m using SudzC as an objective-c wrapper for my xml web services, as you

  • 0

I’m using SudzC as an objective-c wrapper for my xml web services, as you know, SudzC uses TouchXML which is considered one of the best and fastest xml parsers. When loading my xml web service, parsing it and finally saving it to core data, it produces around 2500 records in the database so it is kind of a big service. I noticed something weird, is soap.m file i placed NSLog statement in the following method:

         + (CXMLNode*) getNode: (CXMLNode*) element withName: (NSString*) name {
           for(CXMLNode* child in [element children]) {
             if([child respondsToSelector:@selector(name)] && [[child name] isEqual: name]) {
               return (CXMLNode*)child;
               }
             }

           for(CXMLNode* child in [element children]) {
             CXMLNode* el = [Soap getNode: (CXMLElement*)child withName: name];
             if(el != nil) { return el; }
               }
        return nil;
      }

and noticed that it’s called 2,180,000 times, awesome number !!!

and the children method mentioned above would definitely be called the same big number too, the children method is defined in CXMLNode.m file of TouchXML as follows:

 - (NSArray *)children
      {
       NSAssert(_node != NULL, @"TODO");

       NSMutableArray *theChildren = [NSMutableArray array];
       xmlNodePtr theCurrentNode = _node->children;
   while (theCurrentNode != NULL)
    {
    CXMLNode *theNode = [CXMLNode nodeWithLibXMLNode:theCurrentNode];
    [theChildren addObject:theNode];
     theCurrentNode = theCurrentNode->next;
    }
       return(theChildren);      
   }

so you may imagine how much loops are going on here, however, I ran the app, and noticed that my app crashes (due to low memory) after using this web service and doing some specific actions, but if I do these specific actions (in my app) without using the web service, my app will not crash at all, giving that there is no memory leak or memory related problems in my code.
my request is to use the app with the web service without suffering from crashes..

any suggestions would be highly appreciated to solve this problem.

  • 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-08T00:57:50+00:00Added an answer on June 8, 2026 at 12:57 am

    You are creating some autoreleased objects each time through this code such as the array returned by the children method. These are not released until you drain the autorelease pool they are created in. Typically this is done for you the next time through the run loop. However, if create a lot of autoreleased objects inside a tight loop like it seems you are doing you will need to create your own autorelease pool inside the loop. Where makes the most sense to do this depends on the details of your code. Apple’s documentation has a discussion about using local autorelease pools to reduce peak memory footprint. Note, this documentation still refers to creating NSAutoreleasePool objects instead of the more modern @autoreleasepool {}.

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

Sidebar

Related Questions

That's pretty much it. I'm using Nokogiri to scrape a web page what has
I am reading a book about Javascript and jQuery and using one of the
We are using XSLT to translate a RIXML file to XML. Our RIXML contains
I'm making a simple page using Google Maps API 3. My first. One marker
I'm new to using the Perl treebuilder module for HTML parsing and can't figure
link Im having trouble converting the html entites into html characters, (&# 8217;) i
I am trying to understand how to use SyndicationItem to display feed which is
I used javascript for loading a picture on my website depending on which small
I have a string like this: La Torre Eiffel paragonata all’Everest What PHP function
I'm using v2.0 of ClassTextile.php, with the following call: $testimonial_text = $textile->TextileRestricted($_POST['testimonial']); ... and

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.