-
|
Upon updating the pybind11 to 3.0.2, I'm seeing some objects are created as unique pointers which were previously created as shared pointer, which is causing issue in the one of the constructor. Sample code : in python : Upon inspection I'm able to see EmptyClass_t() is created as unique_ptr and not as shared_ptr. If i change the order like below the error is no longer seen on EmptyClass_t class, but now occurs on EmptyClass1_t. I'm not able to create a simple repro testcase. What would be the right approch to help identify what change caused this error to happen? PS: I have tried to change code to use smart_holder aswell the behaviour is similar. |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
|
Ok i was able to track it down, some classes where declared in pybind::class_ without std::shared_ptr, so in 3.0.1 it was able to handle it but now in 3.0.2 its not. Making sure classes are declared std::shared_ptr in std::shared_ptr, fixed the issue. |
Beta Was this translation helpful? Give feedback.
Ok i was able to track it down, some classes where declared in pybind::class_ without std::shared_ptr, so in 3.0.1 it was able to handle it but now in 3.0.2 its not. Making sure classes are declared std::shared_ptr in std::shared_ptr, fixed the issue.