Simple implementation of a smart pointer.