mirror of
https://github.com/dhewm/dhewm3.git
synced 2025-03-19 09:11:41 +00:00
Fix memory deallocation issue by using delete[] for arrays
This commit is contained in:
parent
a18b9e6bad
commit
da119a30c6
1 changed files with 13 additions and 13 deletions
|
@ -100,8 +100,8 @@ idODE_Midpoint::~idODE_Midpoint
|
|||
=============
|
||||
*/
|
||||
idODE_Midpoint::~idODE_Midpoint( void ) {
|
||||
delete tmpState;
|
||||
delete derivatives;
|
||||
delete[] tmpState;
|
||||
delete[] derivatives;
|
||||
}
|
||||
|
||||
/*
|
||||
|
@ -157,11 +157,11 @@ idODE_RK4::~idODE_RK4
|
|||
=============
|
||||
*/
|
||||
idODE_RK4::~idODE_RK4( void ) {
|
||||
delete tmpState;
|
||||
delete d1;
|
||||
delete d2;
|
||||
delete d3;
|
||||
delete d4;
|
||||
delete[] tmpState;
|
||||
delete[] d1;
|
||||
delete[] d2;
|
||||
delete[] d3;
|
||||
delete[] d4;
|
||||
}
|
||||
|
||||
/*
|
||||
|
@ -230,12 +230,12 @@ idODE_RK4Adaptive::~idODE_RK4Adaptive
|
|||
=============
|
||||
*/
|
||||
idODE_RK4Adaptive::~idODE_RK4Adaptive( void ) {
|
||||
delete tmpState;
|
||||
delete d1;
|
||||
delete d1half;
|
||||
delete d2;
|
||||
delete d3;
|
||||
delete d4;
|
||||
delete[] tmpState;
|
||||
delete[] d1;
|
||||
delete[] d1half;
|
||||
delete[] d2;
|
||||
delete[] d3;
|
||||
delete[] d4;
|
||||
}
|
||||
|
||||
/*
|
||||
|
|
Loading…
Reference in a new issue