On 04/01/2010, at 4:59 AM, Michael Abendroth wrote:

> When I write something like:
> 
> while (true) {
>   NSString *s = [[NSString alloc] initWithString:@"applejuice"];
> }
> 
> Will s be garbage collected? If not, how can I make sure it does get
> deallocated by garbage collection.


As written, it's academic, as your program will never proceed beyond this 
point, and will eventually crash with an out of memory error.

--Graham


_______________________________________________

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 arch...@mail-archive.com

Reply via email to