5. Few simple rules
• Avoid using raw-pointers
• Use reference if user shouldn’t save passed
object
• Use unique_ptr if your object is the only user
of given object
• Use shared_ptr if your object should share
given object
6. More rules
• Each object should have only one owner
• Owner should share resources only with it’s
children, not with parent
• Use vector instead of dynamically allocated
arrays