Commit Graph

1 Commits

Author SHA1 Message Date
Ralf W. Grosse-Kunstleve bf8d6a2900 First fully successful attempt to make `shared_from_this` and trampolines play nicely.
Now also passes the open_spiel iterated_prisoners_dilemma_test ASAN clean, in addition to all pybind11 and PyCLIF unit tests.

The problem was that calling `std::shared_ptr<void>::reset()` with a `void` pointer cannot possibly update the `shared_from_this` `weak_ptr`.

The solution is to store a `shd_ptr_reset` function pointer in `guarded_deleter` (similar in idea to the stored function pointer for calling `delete`).

This commit still includes all debugging code, i.e. is "dirty". The code will be cleaned up after the GitHub CI is fully successful.
2021-06-30 07:04:31 -07:00