This PR defers ref zeroing until save time (instead of immediately on mutations), which has a few effects:
It allows anything dependent on the parent ref (like an OpRef) to be de-ref'd even after the object is mutated
It now means that looking at the ref alone is not sufficient to tell if it's fresh or stale. You must also look at _is_dirty. In future, a helper method to check "freshness" of a ref may be useful.
Resolves:
This PR defers ref zeroing until save time (instead of immediately on mutations), which has a few effects:
OpRef
) to be de-ref'd even after the object is mutatedref
alone is not sufficient to tell if it's fresh or stale. You must also look at_is_dirty
. In future, a helper method to check "freshness" of a ref may be useful.Ref-zeroing already happens here: