shared-pointer delete errer