• 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: Cocoa-dev Digest, Vol 2, Issue 1149
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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


  • Follow-Ups:
    • Re: Cocoa-dev Digest, Vol 2, Issue 1149
      • From: "John C. Randolph" <email@hidden>
  • Prev by Date: Re: Using AGSocket for UDP networking
  • Next by Date: Localized number formatting
  • Previous by thread: Re: Cocoa-dev Digest, Vol 2, Issue 1149
  • Next by thread: Re: Cocoa-dev Digest, Vol 2, Issue 1149
  • Index(es):
    • Date
    • Thread