Destructor for datashapes.