The implemention of smart pointer.