Wednesday, June 20, 2007

C++ Design Tricks

1. Place the copy constructor in the private section to disallow call by values. (Recall the mechanisms of passing by value for objects)

2. Generally, if a destructor is necessary to reclaim memory, then the default for copy assignment and copy construction are not acceptable.

No comments: