DoubleRef/Ptr/0 classes befriended each other to simplify methods