I have this function:
int foo(bar const&);
I want to use it like this:
bar a;
foo(a);
Here no copy of a will be happened.
But if I call it like this:
bar* a = new bar(); //not about dynamic allocation, I know it is not good
foo(*a);
At foo(*a);
, will I loose some performance? Like unnecessary copy?