strncpy(aName, &(aCopy[anIndex]), aNameSize);
aName[aNameSize] = 0;
SetModification(aName,aMinute,aHour,aDay,aMonth,aYear);
- delete(aName);
+ delete [] (aName);
anIndex += aNameSize + 1;
}
if (aCopy[1] == 'l') {
char* aNodeName = new char[127];
sprintf(aNodeName, "AttributeTreeNodeGUID%s", ID().c_str());
string ret(aNodeName);
- delete aNodeName;
+ delete [] aNodeName;
return ret;
}
char* aResult = new char[aLength];
sprintf(aResult, "%s %s %s %s", aFather.c_str(), aPrevious.c_str(), aNext.c_str(), aFirst.c_str());
string ret(aResult);
- delete aResult;
+ delete [] aResult;
return ret;
}
_errorCode = "";
// True if is modified
- if (_doc->IsModified()) return true;
+ if (_doc && _doc->IsModified()) return true;
return false;
}
} 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();
}