add on destroy to constructor

an example of how a destructor might be implemented

Signed-off-by: Christopher Hall <hsw@ms2.hinet.net>