Take parameters appropriately by value, (smart) pointer, or reference.

Parameterize well. Distinguish among input, output, and input/output parameters, and between value and reference parameters. Take them appropriately.