24 Jan
2007
24 Jan
'07
7:15 p.m.
Rich,
In miscres.c, routine ifsload(), line 1438 is this code:
if ((ifs_defn = (float far *)farmemalloc( (long)((NUMIFS+1)*IFS3DPARM*sizeof(float)))) == NULL) {
which allocates some memory into ifs_defn. Earlier in this same function, the same pointer is checked to see if it is non-NULL and if so, it is freed before being allocated later in the function.
However, once allocated, this memory will always be allocated because it will only be freed right before we're ready to allocate memory for it again.
So, you get a memory leak.
What's the right place to release the memory?
I've been putting them in goodbye() in prompts2.c. We should look at deallocating this memory when we change fractal types, as well. Jonathan