j = 0;
}
}
- delete val;
+ delete [] val;
} else if(type == HDF_INT32) {
hdf_int32* val = new hdf_int32[size];
hdf_dataset->ReadFromDisk(val);
read_float64(fp, &(val[i]));
}
hdf_dataset->WriteOnDisk(val);
- delete val;
+ delete [] val;
} else if(type == HDF_INT64) {
hdf_int64* val = new hdf_int64[size];
for(i=0; i<size; i++) {
fscanf(fp, " %li", &(val[i]));
}
hdf_dataset->WriteOnDisk(val);
- delete val;
+ delete [] val;
} else if(type == HDF_INT32) {
hdf_int32* val = new hdf_int32[size];
for(i=0; i<size; i++) {
fscanf(fp, " %i", &(val[i]));
}
hdf_dataset->WriteOnDisk(val);
- delete val;
+ delete [] val;
}
char token[MAX_ID_SIZE];
hdf_attribute->CreateOnDisk();
- delete new_name;
+ delete [] new_name;
if (type == HDF_STRING) {
char tmp;
val[size] = (char)0;
fread(val, 1, size, fp);
hdf_attribute->WriteOnDisk(val);
- delete val;
+ delete [] val;
} else if (type == HDF_FLOAT64) {
hdf_float64 val;
read_float64(fp, &val);
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;
}
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;
}
}