• 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: Object Allocations
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Object Allocations


  • Subject: Re: Object Allocations
  • From: Rosyna <email@hidden>
  • Date: Mon, 17 Sep 2001 20:03:59 -0700

This is the EXACT same situation I have, the same error messages and everything (NSCalibratedRGBColor and NSCFString)

Ack, at 9/17/01, Rainer Brockerhoff said:

// subclassed NSDocument, when opening a document:
// shouldThread is a BOOL instance variable set from preferences.
if (shouldThread) {
[NSApplication detachDrawingThread:@selector(startPlugin:)
toTarget:self withObject:plugin];
} else {
[self startPlugin:plugin];
}

- (void)startPlugin:(id)plugin {
NSAutoreleasePool* pool = nil;
if (shouldThread) {
pool = [[NSAutoreleasePool alloc] init];
}
[plugin doStuff];
[pool release]; }

As I said, it's intermittent. This may not be pertinent to the problem, but the error message (NSAutoReleaseNoPool IIRC) always refers to a NSCFString and an NSCalibratedRGBColor, it happens only for the first opened document, and most - perhaps all - instances I remember seeing happened when the document was opened from within a drag&drop receiver.

The shouldThread variable is set very early when the document is created and never changes afterwards. Even if some evil influence changed it between detachDrawingThread and the test before the NSAutoreleasePool, _all_ temporary objects created by doStuff would be pool-less, not just the two which appear in the messages.

--
Sincerely,
Rosyna Keller
Technical Support/Holy Knight/Always needs a hug

Unsanity: Unsane Tools for Insane People


References: 
 >Re: Object Allocations (From: Rainer Brockerhoff <email@hidden>)

  • Prev by Date: Re: Changing draggedImage in mid-drag
  • Next by Date: Need original stdio.h file
  • Previous by thread: Re: Object Allocations
  • Next by thread: Re: Object Allocations
  • Index(es):
    • Date
    • Thread