libpmemobj-cpp
libpmemobj-cpp copied to clipboard
Extending V<> with cto approach (or documenting how to achieve that manually)
In some cases, where persisting a variable is costly it can be reasonable to only persist before closing a pool. This would require having some kind of dirty flag and setting this flag, either automatically in v.get() or manually by a user. This flag would be cleared either by user or automatically in method like finalize().
Leaving flag to be handled by the user would allow it to be used for multiple objects (some collection).
We should either extend v/create new wrapper with this functionality or write some documentation how cto approach can be implemented.