• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
thread insanity...
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

thread insanity...


  • Subject: thread insanity...
  • From: John Draper <email@hidden>
  • Date: Sun, 26 Mar 2006 02:14:37 -0800

hi,

My appplication (A SIP phone) uses direct Posix threads. It does not use or make
any NSThread objects. As a result, I think this is the reason why I'm getting...
a whole bunch of these...


2006-03-25 15:52:33.340 newSipTestApp[1760] *** _NSAutoreleaseNoPool(): Object 0xb722e10 of class NSConcreteData autoreleased with no pool in place - just leaking
2006-03-25 15:52:33.341 newSipTestApp[1760] *** _NSAutoreleaseNoPool(): Object 0x8224c00 of class NSConcreteData autoreleased with no pool in place - just leaking
2006-03-25 15:52:33.341 newSipTestApp[1760] *** _NSAutoreleaseNoPool(): Object 0xb722d20 of class NSConcreteMutableData autoreleased with no pool in place - just leaking
2006-03-25 15:52:33.341 newSipTestApp[1760] *** _NSAutoreleaseNoPool(): Object 0xb722c60 of class NSIdEnumerator autoreleased with no pool in place - just leaking


I have threads for the UNIX "resiprocate" library (it uses Posix threads), plus I'm using the
JRTPLIB and it also uses Posix threads (slightly different wrapper).


I'm using MTCoreAudio framework for the audio part of the SIP Phone. But it is NOT
thread safe (that's an entirely different issue - I think).


In reading the Cocoa docs, I came across this....

>Using POSIX Threads With Cocoa

>The underlying implementation of NSThread is based on POSIX threads. If you need
>the improved performance and flexibility offered by POSIX threads, you can use
>them instead of NSThread in your application if you choose. If you still intend to use
>Cocoa, though, you first put your application into “multithreaded mode” before
>creating any POSIX threads.


It goes on to say...

>If you intend to use Cocoa calls, you must force Cocoa into its multithreaded mode
>before detaching any POSIX threads. To do this, simply detach an NSThread and have
>it promptly exit.


Ok, now how would I do this? Can someone be kind enough to pass me a snippit if
code which can do this? Where would be a good place to do this? In the
awakeFromNIB method?


Next, if I do that, then would it be safe to add the Autorelease pool to each thread
as recommended, which I hope will rid myself of the thousands of messages I get.


Relating to the MTCoreAudio thread safety issue, has anyone on this list got
any experience using the MTCoreAudio?

John
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden


  • Follow-Ups:
    • Re: thread insanity...
      • From: Nick Zitzmann <email@hidden>
  • Prev by Date: Re: 1.0 divided by 10 = 0.10000000000000001?
  • Next by Date: How to move forward in building Core Data Applications: Beginner to Intermediate & Shuffle an NSArrayController
  • Previous by thread: Re: About AsyncSocket class
  • Next by thread: Re: thread insanity...
  • Index(es):
    • Date
    • Thread