mirror of
https://git.gfz-potsdam.de/naaice/iphreeqc.git
synced 2025-12-16 08:38:23 +01:00
needed to new/delete species and phase structs
This commit is contained in:
parent
ee6fa5331f
commit
fd93f84687
@ -67,7 +67,7 @@ clean_up(void)
|
|||||||
for (j = 0; j < (int)s.size(); j++)
|
for (j = 0; j < (int)s.size(); j++)
|
||||||
{
|
{
|
||||||
s_free(s[j]);
|
s_free(s[j]);
|
||||||
s[j] = (struct species*)free_check_null(s[j]);
|
delete s[j];
|
||||||
}
|
}
|
||||||
s.clear();
|
s.clear();
|
||||||
|
|
||||||
@ -114,7 +114,7 @@ clean_up(void)
|
|||||||
for (j = 0; j < (int)phases.size(); j++)
|
for (j = 0; j < (int)phases.size(); j++)
|
||||||
{
|
{
|
||||||
phase_free(phases[j]);
|
phase_free(phases[j]);
|
||||||
phases[j] = (struct phase*)free_check_null(phases[j]);
|
delete phases[j];
|
||||||
}
|
}
|
||||||
phases.clear();
|
phases.clear();
|
||||||
/* inverse */
|
/* inverse */
|
||||||
@ -1122,9 +1122,7 @@ phase_alloc(void)
|
|||||||
/*
|
/*
|
||||||
* Allocate space
|
* Allocate space
|
||||||
*/
|
*/
|
||||||
phase_ptr = (struct phase *) PHRQ_malloc(sizeof(struct phase));
|
phase_ptr = new struct phase;
|
||||||
if (phase_ptr == NULL)
|
|
||||||
malloc_error();
|
|
||||||
/*
|
/*
|
||||||
* Initialize space
|
* Initialize space
|
||||||
*/
|
*/
|
||||||
@ -1780,9 +1778,7 @@ s_alloc(void)
|
|||||||
*/
|
*/
|
||||||
{
|
{
|
||||||
struct species *s_ptr;
|
struct species *s_ptr;
|
||||||
s_ptr = (struct species *) PHRQ_malloc(sizeof(struct species));
|
s_ptr = new struct species;
|
||||||
if (s_ptr == NULL)
|
|
||||||
malloc_error();
|
|
||||||
/*
|
/*
|
||||||
* set pointers in structure to NULL, variables to zero
|
* set pointers in structure to NULL, variables to zero
|
||||||
*/
|
*/
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user