This implement a simple version of share_ptr.