The SWIG wrapper tool I'm using to generate Python bindings from the C++ DOM bindings requires an explicit destructor to be declared in order to ensure proper destruction. Without this, SWIG will generate (lots of) memory leak warnings.