char* aResultPath = HDFascii::ConvertFromASCIIToHDF(aUrl.c_str());
aC_HDFUrl = new char[strlen(aResultPath) + 19];
sprintf(aC_HDFUrl, "%shdf_from_ascii.hdf", aResultPath);
- delete(aResultPath);
+ delete [] (aResultPath);
aHDFUrl = aC_HDFUrl;
- delete aC_HDFUrl;
+ delete [] aC_HDFUrl;
} else {
aHDFUrl = aUrl;
}
} else if (!strcmp(hdf_dataset->GetName(),"AttributeReference") ||
!strcmp(hdf_dataset->GetName(),"Reference")) { // Old format maintainance
theStudy->NewBuilder()->Addreference(aSO, theStudy->CreateObjectID(current_string));
- delete(current_string);
+ delete [] (current_string);
hdf_dataset->CloseOnDisk();
return;
} else {
anAttr->Load(current_string);
}
- delete(current_string);
+ delete [] (current_string);
hdf_dataset->CloseOnDisk();
}
new_dataset->CloseOnDisk();
new_dataset = 0; //will be deleted by hdf_sco_group destructor
order = atoi(currentVarIndex);
- delete currentVarIndex;
+ delete [] currentVarIndex;
}
else
order = iVar;
SALOMEDSImpl_GenericVariable::VariableTypes aVarType =
SALOMEDSImpl_GenericVariable::String2VariableType(string(currentVarType));
- delete currentVarType;
+ delete [] currentVarType;
//Create variable and add it in the study
SALOMEDSImpl_GenericVariable* aVariable =
new SALOMEDSImpl_ScalarVariable(aVarType,string(aVarName));
aVariable->Load(string(currentVarValue));
aVarsMap.insert(make_pair<int,SALOMEDSImpl_GenericVariable*>(order,aVariable));
- delete currentVarValue;
+ delete [] currentVarValue;
}
}