Work with non-shared_ptrs