The fact that you are making a method call is of no importance here. Reference parameter initialization during a function call is no different from a standalone reference initialization and is governed by the same rules.
The rules of reference initialization are a bit complicated, but the bottom line is that if the initializer is an lvalue (the argument in the method call in your case) and the type of the reference is the same as the type of the initializer (i.e. type of the parameter is the same as the argument type), then the reference will be bound directly. I.e. no copy is created.
Object a; // class type
Object &r = a; // no copying
const Object &cr = a; // no copying
If these requirements are not met (like if the initializer is an rvalue, for example), then it all depends. In some cases the copying might and will take place. For example
const Object &tr = Object();
can be interpreted by the compiler as
const Object &tr = Object(Object(Object(Object())));
with implementation-dependent finite number of copyings. Of course, for efficiency reasons compilers normally are trying not to create unnecessary copies, even when they are allowed to copy.
A classic example that often stirs debate about the validity of the copying behavior of the compiler is the reference initialization in expressions like the following one
Object a;
const Object &r = <some condition> ? a : Object();
A person familiar with C++ reference semantics would understand that expressions like the above are likely the rationale behind the standard permission to perform superfluous copying during reference initialization.
anotherObject
is creating a copy of itself.. the object that is created after the new will be creating a copy ofanotherObject
. – Bunk&anotherObject
is a pointer, not a reference. – Rolfenew object(&anotherObject)
will create a copy of another object implicitly (which is what the wording is suggesting). In order for that statement to hold true, the syntax needs adjusting. – Bunk