private implemetation via unique_deleter_ptr