• 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: Problems with double freeing.
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Problems with double freeing.


  • Subject: Re: Problems with double freeing.
  • From: j o a r <email@hidden>
  • Date: Sun, 20 Nov 2005 16:49:35 +0100


On 20 nov 2005, at 15.45, Tom Jones wrote:

NSArray * theLines = [[[NSString stringWithContentsOfFile: fileName] componentsSeparatedByString:@"\r"]autorelease];

You made a couple of errors like this one. The array returned to you from "componentsSeparatedByString:" should not be autoreleased. Remember the basic rule: You should only release if you alloc / copy. As there is no alloc / copy in the method name "componentsSeparatedByString:", you should not release / autorelease the returned value.


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: 
 >Problems with double freeing. (From: Tom Jones <email@hidden>)

  • Prev by Date: About rich text fields
  • Next by Date: Re: About rich text fields
  • Previous by thread: Problems with double freeing.
  • Next by thread: About rich text fields
  • Index(es):
    • Date
    • Thread