ScopedPtr implemented.