• 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
How are structs passed to Objective-C methods?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

How are structs passed to Objective-C methods?


  • Subject: How are structs passed to Objective-C methods?
  • From: Rick Mann <email@hidden>
  • Date: Fri, 02 Nov 2012 21:26:05 -0700

In my (OS X) app, as part of debugging another issue, I noticed that the debugger is showing a struct parameter type as a reference, even though it is declared plain. In the little test case app I built to help, the same struct is passed by value.

In both cases, it's a parameter to a property setter on an NSManagedObject subclass. But in one, LLDB shows it as "Rect&" when stopped inside the setter, and in the other, it shows it as "Rect".

In both cases, it seems to work correctly.

--
Rick




 _______________________________________________
Do not post admin requests to the list. They will be ignored.
Xcode-users mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden

  • Follow-Ups:
    • Re: How are structs passed to Objective-C methods?
      • From: Rick Mann <email@hidden>
  • Prev by Date: Re: Is this a bad idea or is this supported?
  • Next by Date: Re: How are structs passed to Objective-C methods?
  • Previous by thread: Status: Migrating from 4.5.1 to 4.5.2 + selected target device + command line tools update.
  • Next by thread: Re: How are structs passed to Objective-C methods?
  • Index(es):
    • Date
    • Thread