Top "Pass-by-reference" questions

Pass by reference is an argument marshalling strategy whereby a variable's location in memory is passed to a function, rather than a copy of the variable's value, although the function appears in the source code to receive the variable itself rather than a pointer to it.

java Boolean value not changing in called method

I have a scenario where I want to set a Boolean object and then use its booleanValue() in a constructor …

java pass-by-reference pass-by-value
Passing object by reference to std::thread in C++11

Why can't you pass an object by reference when creating a std::thread ? For example the following snippit gives a …

c++ multithreading c++11 pass-by-reference stdthread
In PHP (>= 5.0), is passing by reference faster?

In PHP, function parameters can be passed by reference by prepending an ampersand to the parameter in the function declaration, …

php performance pass-by-reference
Delphi passing parameters by reference or by value/copy

Context 1 var text:String; text:='hello'; myFunc(text); Context2 function myFunc(mytext:String); var textcopy:String; begin textcopy:=mytext; end; …

delphi pointers pass-by-reference pascal
How are arrays passed?

Are arrays passed by default by ref or value? Thanks.

c++ arrays pointers pass-by-reference pass-by-value
Out parameters in C

void swap(int &first, int &second){ int temp = first; first = second; second = temp; } int a=3,b=2; swap(a,…

c parameters pass-by-reference out-parameters
How do you pass objects by reference in PHP 5?

In PHP 5, are you required to use the & modifier to pass by reference? For example, class People() { } $p = new …

php variables object pass-by-reference
How to make a copy of an object without reference?

It is well documented that PHP5 OOP objects are passed by reference by default. If this is by default, it …

php object pass-by-reference
Are channels passed by reference implicitly

The go tour has this example for channels: https://tour.golang.org/concurrency/2 package main import "fmt" func sum(a []…

concurrency go channels pass-by-reference
Is Java really passing objects by value?

Possible Duplicate: Is Java pass by reference? public class myClass{ public static void main(String[] args){ myObject obj = new myObject("…

java parameter-passing terminology pass-by-reference pass-by-value