char* name = makeName(hdf_group->GetName());
fprintf(fp, "%s %i\n", name, nbsons+nbAttr);
- delete name;
+ delete [] name;
for(unsigned j=0; j<nbAttr; j++) {
name = hdf_group->GetAttributeName(j);
HDFattribute *hdf_attribute = new HDFattribute(name, hdf_group);
- delete name;
+ delete [] name;
SaveAttributeInASCIIfile(hdf_attribute, fp, ident+1);
hdf_attribute = 0;
}
fprintf(fp, "%s\n", DATASET_ID);
fprintf(fp, "%s %i %i\n", name, type, nbAttr);
- delete name;
+ delete [] name;
hdf_dataset->GetDim(dim);
fprintf(fp, " %i\n", ndim);
}
fprintf(fp, "\n");
- delete dim;
+ delete [] dim;
fprintf(fp, "%li %i:", size, order);
char* val = new char[size];
hdf_dataset->ReadFromDisk(val);
fwrite(val, 1, size, fp);
- delete val;
+ delete [] val;
} else if (type == HDF_FLOAT64) {
hdf_float64* val = new hdf_float64[size];
hdf_dataset->ReadFromDisk(val);
}
else fprintf(fp," ");
}
- delete val;
+ delete [] val;
} else if(type == HDF_INT64) {
hdf_int64* val = new hdf_int64[size];
hdf_dataset->ReadFromDisk(val);
j = 0;
}
}
- delete val;
+ delete [] val;
}
fprintf(fp, "\n");
{
name = hdf_dataset->GetAttributeName(j);
HDFattribute *hdf_attribute = new HDFattribute(name, hdf_dataset);
- delete name;
+ delete [] name;
SaveAttributeInASCIIfile(hdf_attribute, fp, ident+1);
hdf_attribute = 0;
}
fprintf(fp, "%s\n", ATTRIBUTE_ID);
fprintf(fp, "%s %i %i\n", name, type, size);
- delete name;
+ delete [] name;
if (type == HDF_STRING) {
char* val = new char[size+1];
fprintf(fp, ":");
fwrite(val, 1, size, fp);
fprintf(fp, "\n");
- delete val;
+ delete [] val;
} else if (type == HDF_FLOAT64) {
hdf_float64 val;
hdf_attribute->ReadFromDisk(&val);