Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 4051286
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 20, 20262026-05-20T14:10:34+00:00 2026-05-20T14:10:34+00:00

Does objective-c methods support pass by value? Or perhaps to be more specific: Is

  • 0

Does objective-c methods support “pass by value”? Or perhaps to be more specific:

  1. Is the default behavior for parameters passed into a method pass-by-reference?
  2. If yes, are there any variations from this in some circumstances – for example if the parameter is just a basic int as opposed to an object? (or is this not relevant in objective-c)
  3. Is there anyway to have a method support pass-by-value for a basic variable such as int?
  4. Is there anyway to have a method support pass-by-value for an object? (I’m assuming no here, but for completeness will ask. Of course one could within the message do the copy yourself, however for this approach I’ll consider this not to be something objective-c methods offers you, i.e. rather it was a do-it-yourself)

thanks

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-20T14:10:34+00:00Added an answer on May 20, 2026 at 2:10 pm
    1. No. It’s pass-by-value by default, like in C. Except for the fact that for the Objective C class instance references, the value is a reference. So Objective C class instances are passed effectively by reference.

    2. N/A

    3. See 1.

    4. Not really. You can serialize, pass the string, and recreate inside. Or you can have the object store its ivars as a structure and pass that structure by value. Some objects support cloning.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

As far as my knowledge, Objective-C does not support method overloading. What can be
Does Objective-C support marking properties/methods with attributes? like so: #MyAttribute //sudo example @porperty (nonatomic,
Does a method like eval exist in Objective-C as in Javascript, Ruby, PHP, or
If subclass in objective-c wants to override a super class's method, does it have
When creating a UIViewController derived class in objective-C, what goes into the init method,
Possible Duplicate: objective-c : @synchronized, how does it work? when i have three methods:
I'm aware that Objective-C doesn't support real private methods. What I'm currently doing to
What exactly does the Objective-C garbage collector collect? For example, if I'm writing a
I wanted to know , How exactly does an Objective C object gets created.
Possible Duplicate: What does ^ in objective C mean? [SKSite requestSiteWithNameLike:@Stack Overflow completionHandler:^(SKSite *site,

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.