• 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
Re: NSColor autorelease problem (was Strange leak log)
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: NSColor autorelease problem (was Strange leak log)


  • Subject: Re: NSColor autorelease problem (was Strange leak log)
  • From: "Todd de Gruyl" <email@hidden>
  • Date: Fri, 10 Jan 2003 11:13:32 -0500
  • Organization: Magnoliophyte

From: Steve <email@hidden>
> When this is called programmatically, there is no problem, and the
> NSColor is (I guess) being correctly auotreleased at some point.
> (...next time round the event loop?).
>
> However the same code is can also be called from a callback routine (a
> CoreMidi process), which creates a new thread. When this happens, I get
> the following error log:
>
> >2003-01-10 08:32:20.442 ChordCompleteDebug[788] ***
> _NSAutoreleaseNoPool(): Object 0x19c52d0 of class >NSCalibratedRGBColor
> autoreleased with no pool in place - just leaking

This is most likely caused by not having an NSAutoreleasePool object
associated with the new thread.

You need to:
NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init];

//... code...

[pool release];
inside the new thread code to fix this problem.

--
Todd deGruyl
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.

References: 
 >NSColor autorelease problem (was Strange leak log) (From: Steve <email@hidden>)

  • Prev by Date: Re: NSTimer or double to int cast (Bug?)
  • Next by Date: Re: Auto-Shrinking Window 'Feature'?
  • Previous by thread: NSColor autorelease problem (was Strange leak log)
  • Next by thread: NSPopUpButton - odd behavior
  • Index(es):
    • Date
    • Thread