finish SmartPtr