• 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: Can't delete file on device
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Can't delete file on device


  • Subject: Re: Can't delete file on device
  • From: Wade Tregaskis <email@hidden>
  • Date: Tue, 27 Mar 2012 16:02:40 -0700

> Okay, I made that change, but it seems blatantly incorrect to create an error return if it is also going to return true.

It only returns you something if it says it did, by indicating that an error occurred.  Otherwise, the contents of the error parameter are undefined.

There are definitely some Apple frameworks which will modify the error parameter even if they succeed.  There are definitely some which won't.  So you can neither rely on it being nil nor on being non-nil, regardless of what you initialise it to.

So like it or not, this isn't about preference, it's about correctness.

ARC doesn't change much.  The callee is still free to write something into the error parameter and leave it there; it'll merely be released by the caller, rather than the callee (which without ARC momentarily leaves a dangling pointer).  So it'll reduce the incidence of leaks, but that's about it.
_______________________________________________

Cocoa-dev mailing list (email@hidden)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden

References: 
 >Can't delete file on device (From: Rick Mann <email@hidden>)
 >Re: Can't delete file on device (From: Mike Abdullah <email@hidden>)
 >Re: Can't delete file on device (From: Roland King <email@hidden>)
 >Re: Can't delete file on device (From: Rick Mann <email@hidden>)
 >Re: Can't delete file on device (From: Mike Abdullah <email@hidden>)
 >Re: Can't delete file on device (From: Rick Mann <email@hidden>)
 >Re: Can't delete file on device (From: Conrad Shultz <email@hidden>)
 >Re: Can't delete file on device (From: Rick Mann <email@hidden>)

  • Prev by Date: Re: How to throttle rate of NSInputStream?
  • Next by Date: Re: Can't delete file on device
  • Previous by thread: Re: Can't delete file on device
  • Next by thread: Re: Can't delete file on device
  • Index(es):
    • Date
    • Thread