Item 28: Avoid Returning "Handles" to Object Internals

Handles include pointers, reference, and iterators (ways to get at other objects). It decreases encapsulation and might result in dangling pointer. You should only prefer using handles in certain specific scenarios (like containers).

Creative Commons License
This blog by Che-Liang Chiou is licensed under a Creative Commons Attribution 4.0 International License.