Description of contribution in a few bullet points
Stop ceres problem from freeing the loss function when we reset the solver. This is important because otherwise calling solver_->Reset() invalidates the lossfunction pointer held by the solver (whereas I would expect the behavior of solver->Reset() to be that the loss function is left unchanged). Open to alternative ways to address this problem, but this worked for my use case.
It also seemed like the blocks_ object should be freed in the ~CeresSolver() function (since I don't think the problem takes ownership of this).
I ran into this issue because in my use case, I need to cleanly reset the slam toolbox state multiple times without killing the process (funny enough you don't run into major issues until the second time you call solver_->Reset()). I also think this would affect people if they needed to call deserialize pose graph multiple times.
Description of documentation updates required from your changes
None that I know of.
Future work that may be required in bullet points
I hope to make a future PR with the reset function if it makes sense for general use cases. atm it seems unique to my use case.
Basic Info
Description of contribution in a few bullet points
Description of documentation updates required from your changes
None that I know of.
Future work that may be required in bullet points