ot::OwnedPtr::Reset() method
Frees the current object owned by `OwnedPtr` (if any) and replaces it with a new one. The method will `Free()` the current object managed by `OwnedPtr` (if different from @p aPointer) before taking the ownership of the object at @p aPointer. The method correctly handles a self `Reset()` (i.e., @p aPointer being the same pointer as the one currently managed by `OwnedPtr`).
Arguments
aPointer
A pointer to the new object to replace with.