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.

Pass a string by reference in Javascript

I want to create a string and pass it by reference such that I can change a single variable and …

javascript string pass-by-reference
Passing objects and a list of objects by reference in C#

I have a delegate that modifies an object. I pass an object to the delegate from a calling method, however …

c# pass-by-reference
Changing value after it's placed in HashMap changes what's inside HashMap?

If I create a new HashMap and a new List, and then place the List inside the Hashmap with some …

java hashmap pass-by-reference
Confused, whether java uses call by value or call by reference when an object reference is passed?

public class program1{ public static void main(String args[]){ java.util.Vector vc=new java.util.Vector(); vc.add("111"); vc.…

java pass-by-reference pass-by-value
ArrayList and modifying objects included in it

Say we have an ArrayList myArray. I want to modify an object by calling its function. If I do it …

java arraylist pass-by-reference
Can you pass-by-reference in R?

Can you pass by reference with "R" ? for example, in the following code: setClass("MyClass", representation( name="character" )) instance1 <…

r oop parameter-passing pass-by-reference
Passing ArrayList as value only and not reference

Simply put, I have a method with an ArrayList parameter. In the method I modify the contents of the ArrayList …

java reference arraylist pass-by-reference
C++ - passing references to std::shared_ptr or boost::shared_ptr

If I have a function that needs to work with a shared_ptr, wouldn't it be more efficient to pass …

c++ boost pass-by-reference pass-by-value shared-ptr
Use of the & operator in C++ function signatures

I'm currently reading through Accelerated C++ and I realized I don't really understand how & works in function signatures. int* …

c++ pass-by-reference
Passing by reference to a constructor

I decided to see if assigning a reference to a member would make a member a reference. I wrote the …

c++ constructor pass-by-reference