R6 Eddington class cannot be saved without data loss.
pegeler opened this issue · comments
Paul Egeler commented
The hash map of ride history is just a pointer (Rcpp::XPtr
) to a std::unordered_map
. So if a user attempts to save the Eddington
class using save()
or saveRDS()
, they will be disappointed when reloading data since the pointer will be nil
and the data will be lost.
This means that in current-state, several functions will not work as intended when attempting to manipulate the same object between sessions. Some will error silently (like the update()
method) and others will raise an error (like attempting to access the H
active field).