smart pointer

A Smart pointer is a composition class that is designed to manage dynamically allocated memory and ensure that memory gets deleted when the smart pointer object goes out of scope. 
Smart pointer is used in C++ and Rust.