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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 16, 20262026-05-16T02:58:39+00:00 2026-05-16T02:58:39+00:00

Does anyone know what this error means? *** attempt to pop an unknown autorelease

  • 0

Does anyone know what this error means?
*** attempt to pop an unknown autorelease pool

I am seeing this in my app that uses NSOperations in NSOperationQueue. Each operation has it’s own Autorelease pool. Since each operation is parsing xml and pushing information into Core Data, I periodically ‘drain’ my autorelease pool and re-create it. If I don’t drain the pool, I don’t see these errors.

UPDATE:
Here’s my code:

In the main of my NSOperation, I alloc the pool and assign it to an ‘assign’ property like this:

self.downloadAndParsePool = [[NSAutoreleasePool alloc] init];

at the end of my main I release it like this:

[self.downloadAndParsePool release];
self.downloadAndParsePool = nil;

If the operation does a lot of parsing and inserting into Core Data, it will call my drain method periodically:

- (void) drainAutoreleasePool
{
    // drain and re-create autorelease pool...this method is called periodically to keep memory down during parsing of large trees
    if (self.downloadAndParsePool)
    {
        [self.downloadAndParsePool drain];
        self.downloadAndParsePool = [[NSAutoreleasePool alloc] init];
    }
}
  • 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-16T02:58:39+00:00Added an answer on May 16, 2026 at 2:58 am

    It seems that the issue is caused by the fact that the drain is called outside of the method that allocated the pool even if on the same thread. Here is what NSAutoreleasePool Class Reference says.

    You should always drain an autorelease
    pool in the same context (invocation
    of a method or function, or body of a
    loop) that it was created.

    The message you see is triggered by your call to drain in drainAutoreleasePool:

    [self.downloadAndParsePool drain];
    

    NOTE: XMLPerformance sample app uses the same pattern of periodically draining the pool. It also produces this message since iOS4.0

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

Sidebar

Related Questions

Does anyone know what this means. Getting this in C# winforms applications: Not a
Anyone know this compiler feature? It seems GCC support that. How does it work?
Does anyone know what this value is for? If it is set to 1,
I cannot find this in the documentation anywhere. Does anyone know if this is
Does anyone know what is wrong with this query? SELECT DISTINCT c.CN as ClaimNumber,
Does anyone know how to turn this string: Smith, John R Into this string:
does anyone know if you can do something like this using the (N)Hibernate criteria
Does anyone know of crossbrowser equivalent of explicitOriginalTarget event parameter? This parameter is Mozilla
Does anyone know? And a bigger question is what happens when you encounter this
Does anyone know how to change the brush for a menu's background? This sounds

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.