smart pointer like shared_ptr