Replace some Release() calls with virtual destructors.