Re: multithreading, cocoa, pools and POSIX
Re: multithreading, cocoa, pools and POSIX
- Subject: Re: multithreading, cocoa, pools and POSIX
- From: Ondra Cada <email@hidden>
- Date: Tue, 7 Jun 2005 19:28:07 +0200
Luc,On 7.6.2005, at 19:20, Luc Vandal wrote: Cocoa now seems to be in multithread mode. However, I still get a crash on [pool release]:
NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init];
NSNotification *notif = [NSNotification notificationWithName:@"TextFeedCallback" object:nil userInfo:nil];
This (just like anything other but alloc/init, copy, mutableCopy, and new) returns autoreleased object. Therefore... [notif autorelease];
... this autoreleases the object second time, and therefore... [pool release];
... this fails. Am I doing something wrong?
Yup: you forgot to learn the Cocoa memory management :) |
Attachment:
smime.p7s
Description: S/MIME cryptographic signature
_______________________________________________
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