Does objective-c methods support "pass by value"? Or perhaps to be more specific:
- Is the default behavior for parameters passed into a method pass-by-reference?
- 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)
- Is there anyway to have a method support pass-by-value for a basic variable such as int?
- 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