Re: static objects "autoreleased with no pool in place - just leaking"
Re: static objects "autoreleased with no pool in place - just leaking"
- Subject: Re: static objects "autoreleased with no pool in place - just leaking"
- From: j o a r <email@hidden>
- Date: Fri, 13 Feb 2004 13:38:09 +0100
Fine, have it your way... What about something like this?
======================================================
static NSColor* sDefaultLabelColor = nil;
int main(int argc, const char *argv[])
{
NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init];
sDefaultLabelColor = [NSColor colorWithDeviceRed: 0.0 green:0.0
blue:0.0 alpha:1.0];
// If you're using a main nib file
// [NSBundle loadNibNamed: @"MainMenu" owner: [NSApplication
sharedApplication]];
[[NSApplication sharedApplication] run];
// Not strictly needed - as we're terminating
[pool release];
}
======================================================
j o a r
[demime 0.98b removed an attachment of type application/pkcs7-signature which had a name of smime.p7s]
_______________________________________________
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.