ElementArrayView.__getitem__ -- dangling reference risk
lib/python/element_array_view.cpp:48
Uses return_value_policy::reference without keep_alive. If the parent Variable is GC'd, returned references dangle.
H6. ElementArrayView.__iter__ -- missing keep_alive
lib/python/element_array_view.cpp:50-52
py::make_iterator without keep_alive<0, 1>(). Compare to dataset.cpp:58-61 which does it correctly.
ElementArrayView.__getitem__-- dangling reference risklib/python/element_array_view.cpp:48Uses
return_value_policy::referencewithoutkeep_alive. If the parent Variable is GC'd, returned references dangle.H6.
ElementArrayView.__iter__-- missingkeep_alivelib/python/element_array_view.cpp:50-52py::make_iteratorwithoutkeep_alive<0, 1>(). Compare todataset.cpp:58-61which does it correctly.