add virtual destructor

If we don't add the virtual destructor, XCode will complains and generate many warnings.