add destructor free member pointer and set value to NULL