fixed a potentially fatal error of doing a delete in a destructor
on the object containing the destructor.
This commit is contained in:
parent
0c28f2aabe
commit
a2fdaba16d
1 changed files with 7 additions and 2 deletions
|
|
@ -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) {
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue