Migrate unique_ptr and shared_ptr uses to py::smart_holder - #442
Conversation
|
@sjunges Any comments or things to consider before merging? |
| py::arg("model"), py::arg("formula"), py::arg("compute_scheduler") = false); | ||
|
|
||
| using PcaaWeightVectorChecker = storm::modelchecker::multiobjective::PcaaWeightVectorChecker<storm::models::sparse::Mdp<ValueType>>; | ||
| py::class_<PcaaWeightVectorChecker, std::unique_ptr<PcaaWeightVectorChecker>> weightedObjectiveMdpModelChecker( |
There was a problem hiding this comment.
This seems to be the only case where we used a unique_ptrinstead of a shared_ptr. I would argue that using the smart pointer holder here is still a good idea.
There was a problem hiding this comment.
With the smart pointer, you mean the unique_ptr or the smart_holder? :)
There was a problem hiding this comment.
Why not use the smart holder everywhere? I think the main problem could be on places where we have problems with the ownership?
There was a problem hiding this comment.
We are now actually using the smart holder everywhere. I just wanted to point out that we originally used a unique_ptr here, in case this was relevant. But I believe it was not important.
|
LGTM |
py::smart_holderunique_ptr and shared_ptr uses to py::smart_holder
Fixes #303. I ran this script on the source code: