• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Crash after [NSData dataWithData:(NSMutableData *)]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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

References: 
 >Crash after [NSData dataWithData:(NSMutableData *)] (From: email@hidden)

  • Prev by Date: Re: Using AGSocket for UDP networking
  • Next by Date: Re: NSMutableCopy Issue - New to Cocoa and Objective-C
  • Previous by thread: Re: Crash after [NSData dataWithData:(NSMutableData *)]
  • Next by thread: Re: Crash after [NSData dataWithData:(NSMutableData *)]
  • Index(es):
    • Date
    • Thread