Re: Cocoa-dev Digest, Vol 2, Issue 1149
Re: Cocoa-dev Digest, Vol 2, Issue 1149
- Subject: Re: Cocoa-dev Digest, Vol 2, Issue 1149
- From: Ben Kazez <email@hidden>
- Date: Tue, 26 Jul 2005 10:10:17 -0400
From: email@hidden
Date: Tue, 26 Jul 2005 06:35:17 -0700
Subject: Crash after [NSData dataWithData:(NSMutableData *)]
>
NSMutableData * sourceData = [NSMutableData dataWithCapacity:
[theAnnotatedData length]];
// append some bytes to sourceData
NSData * destinationData = [NSData dataWithData:aData];
[sourceData release];
-[NSMutableData dataWithCapacity:] is a convenience method, so it
returns an autoreleased object. Therefore, I think there's no need to
release it.
I'm really new to Cocoa, so please, someone correct me if this is wrong.
Ben
--
Ben Kazez
http://www.benkazez.com/
_______________________________________________
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