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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 19, 20262026-05-19T14:28:08+00:00 2026-05-19T14:28:08+00:00

My Application structure is as follows, the core part is written in C++ and

  • 0

My Application structure is as follows,
the core part is written in C++ and using thread heavily, and i am developing UI in Objective C on top of it,
if i don’t execute the thread it works fine, but i can’t disable, stop thread, UI is crashing randomly in the log i could see , following message

__NSAutoreleaseNoPool(): Object 0x350270 of class NSCFString autoreleased with no pool in place - just leaking

Similar messages coming more then once,
by googling come to know, i need to set NSAutoReleasePool to get rid of it, but how its possible to integrate the same with C++ code.

Edit: Core lib will be activated from UI , hence i suppose, its safe to say UI is running in the main thread, Lib is creating/terminating thread without notifying UI,
in this case, can i call AutoReleasePool in the UI

Can anyone guide me?

  • 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-19T14:28:08+00:00Added an answer on May 19, 2026 at 2:28 pm

    See these docs for what you should know about multithreading with Cocoa: http://developer.apple.com/library/mac/#documentation/Cocoa/Conceptual/Multithreading/ThreadSafetySummary/ThreadSafetySummary.html

    It’s OK to design your app like you have, but two things should be kept in mind:

    1. Life is simplest (and sometimes necessary) when UI controls like views (AppKit or UIKit) are manipulated on the main thread. You can use Foundation objects and some AppKit/UIKit objects on background threads, and some Foundation objects can be used from multiple threads.
    2. If you’re using any Cocoa objects at all in background threads, you’ll need to set up autorelease pools on those threads.

    Like so:

    - (void)backgroundThreadStart 
    {
        NSAutoreleasePool * pool = [[NSAutoreleasePool alloc] init];
    
        // do stuff
    
        [pool release];
    }
    

    That will fix your console errors, but you might have other issues that led to the actual crashing you were seeing.

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

Sidebar

Related Questions

I have a Zend Framework application structure as below: /application /library /Zend /Core /Filter
I have a large application (~50 modules) using a structure similar to the following:
My directory structure looks like follows. (i'm using ext mvc ) www.mysite.com/ext/designer.js www.mysite.com/ext/app/view www.mysite.com/ext/app/store
I am currently working on a little application: The structure follows in some way
My directory structure is as follows: application/ tmp/ rails_code/Capfile rails_code/config/deploy.rb rails_code/Gemfile rails_code/Gemfile.lock non_rails_code/ I
I am working on a certain application. Its basic structure is as follows: a
I have a structure like follows: /application ..... --/modules ----/structure ------/controllers --------/indexController.php ------/forms --------/Department.php
I'm using Core Data and I have a file-folder tree-like structure. So I've created
I have a Web application in maven that follows this structure: src `-- main
I have a simple python application where my directory structure is as follows: project/

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.