Make memory pool have virtual destructor.