Closed
Description
Continuing from #18656.
Commit 6bdc18c removes an erroneous ClearWrap() call that I think is indicative of a bigger problem.
Some persistent objects are sometimes destroyed by the garbage collector, sometimes by explicit action (e.g. closing of a handle), and that can leave the object in an inconsistent state.
My hunch is that most ClearWrap() calls can simply be removed.