This is my proposed solution to #138.
Had to change create_sol to admit &self instead of &mut self (because otherwise model cannot be borrowed). With this changes should make it not possible to perform use after free (with solution, clone_for_plugin seems to also allow use after free).
The tests pass otherwise.
This is my proposed solution to #138. Had to change
create_sol
to admit&self
instead of&mut self
(because otherwisemodel
cannot be borrowed). With this changes should make it not possible to perform use after free (withsolution
,clone_for_plugin
seems to also allow use after free). The tests pass otherwise.Do of this what you want.