CompressionModel *CompressionModel::loadModel(DataInput& in) { string type; in >> type; CompressionModel *model = createModel(type); model->load(in); return model; }
CompressionModel *CompressionModel::loadModel(DataInput& in) { string type; in >> type; CompressionModel *model = createModel(type); try { model->load(in); } catch (...) { delete model; throw; } return model; }