scapix icon indicating copy to clipboard operation
scapix copied to clipboard

`scapix::bridge::object`-derived class parameters can be bridged without `std::shared_ptr`

Open TimPushkin opened this issue 1 year ago • 0 comments

The docs state that "Classes derived from scapix::bridge::object are bridged by reference and supported in Scapix bindings only when passed as std::shared_ptr" -- I thought that this means one has to wrap scapix::bridge::object-derived classes into std::shared_ptr in bridged methods both when such classes are returned or used as parameters. However, I found that methods containing scapix::bridge::object-derived parameters passed by value or const reference also get included in the generated bridge (I tested Java) even though std::shared_ptr is not used. Is this a feature that can be reliably used? If so, it would be nice to have this documented more clearly.

TimPushkin avatar Jul 14 '23 12:07 TimPushkin