Improved implementation of RefCountPtr
Improved implementation of RefCountPtr