Implement single_ptr and shared_ptr