Is there any reason why
NonCopyablePersistentTrait's
kResetInDestructor is still set to
false? Can it be updated to
true?
The comments seem to indicate that it would be switched at some time in the future (written 6 years ago).
And ~Persistent has a comment that the flag should always be true.
This primarily affects use cases which involve setting the Persistent to weak, as otherwise you can use Global which does reset in its destructor. There if you have a class which holds a Persistent as a member, you end up with corruption unless you remember to explicitly call Reset in your own destructor.
Thanks,
Daryl.