fixed a potentially fatal error of doing a delete in a destructor

on the object containing the destructor.
This commit is contained in:
Harry Moffat 2003-09-03 18:17:49 +00:00
parent 0c28f2aabe
commit a2fdaba16d

View file

@ -13,9 +13,14 @@ namespace Cantera {
return __u;
}
static void deleteUnit() {
if (__u) {
delete __u;
__u = 0;
}
}
virtual ~Unit() {
delete __u;
__u = 0;
}
doublereal actEnergyToSI(string units) {