add destruct func test code