Fixed some memory leaks in GeneralField, Extent, and dsrepack