commit | 30f6c3b36e580e49419f8775e2b22bea48b0929b | [log] [tgz] |
---|---|---|
author | Dean Moldovan <dean0x7d@gmail.com> | Mon Jun 26 23:20:39 2017 +0200 |
committer | Dean Moldovan <dean0x7d@gmail.com> | Thu Jun 29 11:31:54 2017 +0200 |
tree | d02f3b91f8e45a186d69ab61871571dc2da09ef2 | |
parent | af2dda38ef01bddec4434450f76ebb5875f59df7 [diff] [blame] |
Fix indirect loading of Eigen::Ref Put the caster's temporary array on life support to ensure correct lifetime when it's being used as a subcaster.
diff --git a/include/pybind11/eigen.h b/include/pybind11/eigen.h index 53d4dab..fc07051 100644 --- a/include/pybind11/eigen.h +++ b/include/pybind11/eigen.h
@@ -462,6 +462,7 @@ if (!fits || !fits.template stride_compatible<props>()) return false; copy_or_ref = std::move(copy); + loader_life_support::add_patient(copy_or_ref); } ref.reset();