Re: Crash after [NSData dataWithData:(NSMutableData *)]
Re: Crash after [NSData dataWithData:(NSMutableData *)]
- Subject: Re: Crash after [NSData dataWithData:(NSMutableData *)]
- From: j o a r <email@hidden>
- Date: Tue, 26 Jul 2005 15:48:31 +0200
On 26 jul 2005, at 15.35, email@hidden wrote:
The program crashes with EXC_BAD_ACCESS in NSPopAutoreleasePool/
objc_msgSend_rtp if I release sourceData. If I comment out the last
line, no crash.
There is plenty of other stuff I could be doing wrong (e.g., being
a hopeless noob), but as a sanity check, am I supposed to be
retaining something or not using NSData dataWithData: from an
instance of NSMutableData?
sourceData is already scheduled to be released, as it's returned to
you autoreleased, so you should not release it.
This is Cocoa memory management 101...
j o a r
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