fixed memory leak and recursive destructor in StaticModelData