Hi
How can I tell that default autorelease pool exists?
here is why I ask

Aaron Hillehass in his book, said that if object wasn't created with
 alloc, new, copy or mutableCopy then that object will be added
to the default autorelease pool
and indeed, in the simple guiless Cocoa application
if I try to call, for example,
NSString *textString = [NSString stringWithCString:"Hello From Cocoa" encoding:NSMacOSRomanStringEncoding];
without cretaing NSAutoreleasePool
I'll get
2008-04-03 19:59:00.833 NSArrayTest[57600:10b] *** _NSAutoreleaseNoPool(): Object 0x1099e0 of class NSCFString autoreleased with no pool in place - just leaking

but from other hand in the complex Carbon application, where I never explicitly created NSAutoreleasePool object
I can call
NSString *textString = [NSString stringWithCString:"Hello From Cocoa" encoding:NSMacOSRomanStringEncoding];
without any warnings about _NSAutoreleaseNoPool

so I suppose default NSAutoreleasePool was created for me

so how I can verify it?

thanks


Dmitry Markman

_______________________________________________

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to [EMAIL PROTECTED]

Reply via email to