• 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: Arc: Switch case is in protected scope
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Arc: Switch case is in protected scope


  • Subject: Re: Arc: Switch case is in protected scope
  • From: ChanMaxthon <email@hidden>
  • Date: Wed, 23 Oct 2013 01:08:29 +0800

ARC have more insertion points - beginning of scope retaining all passed-in arguments or used objects, call point creating objects, and end of scope (auto)releasing objects. A missed retain causes race issues, a missed (auto)release leaks objects and an extra release makes dangling pointers, possibly busts a lot later making it almost impossible to trace and debug.

Sent from my iPhone

> On 2013年10月23日, at 0:57, Scott Ribe <email@hidden> wrote:
>
>> On Oct 22, 2013, at 10:46 AM, Maxthon Chan <email@hidden> wrote:
>>
>> As I said, either ARC or C++ objects with constructors and destructors requires compiler to insert code into the beginning and ending of the current scope
>
> For C++, the constructor is inserted at the call point, not at the beginning of the scope. Which actually makes it more clear what the problem with switch is. (If the constructor were inserted at the beginning of the scope, there would be no problem with potentially skipping over it.)
>
> --
> Scott Ribe
> email@hidden
> http://www.elevated-dev.com/
> (303) 722-0567 voice
>
>
>
>

_______________________________________________

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


  • Follow-Ups:
    • Re: Arc: Switch case is in protected scope
      • From: Scott Ribe <email@hidden>
References: 
 >Arc: Switch case is in protected scope (From: "Gerriet M. Denkmann" <email@hidden>)
 >Re: Arc: Switch case is in protected scope (From: Daniel Höpfl <email@hidden>)
 >Re: Arc: Switch case is in protected scope (From: Sean McBride <email@hidden>)
 >Re: Arc: Switch case is in protected scope (From: Scott Ribe <email@hidden>)
 >Re: Arc: Switch case is in protected scope (From: Scott Ribe <email@hidden>)

  • Prev by Date: Re: Arc: Switch case is in protected scope
  • Next by Date: Re: Arc: Switch case is in protected scope
  • Previous by thread: Re: Arc: Switch case is in protected scope
  • Next by thread: Re: Arc: Switch case is in protected scope
  • Index(es):
    • Date
    • Thread