Fixed a major memory leak.

- C++ is never simple. Abstract base classes (ABCs) in C++ require a
  virtual destructor if they're going to be inherited. This caused a
  serious memory leak and high processor usage. I couldn't figure out
  why unique_ptrs were leaking...