|
From: Ethan A M. <merritt@u.washington.edu> - 2006-03-15 04:51:27
|
On Tuesday 14 March 2006 07:19 pm, Daniel J Sebald wrote:
> I may have by chance found at least one source of a memory leak
> without even going to valgrind yet.
Yup.
> reset_palette()
> {
> if (!enable_reset_palette) return;
> sm_palette.colorMode = SMPAL_COLOR_MODE_RGB;
> sm_palette.formulaR = 7; sm_palette.formulaG = 5;
> sm_palette.formulaB = 15;
> sm_palette.positive = SMPAL_POSITIVE;
> sm_palette.ps_allcF = 0;
> sm_palette.use_maxcolors = 0;
> sm_palette.gradient_num = 0;
> sm_palette.gradient = NULL;
> sm_palette.cmodel = C_MODEL_RGB;
> sm_palette.gamma = 1.5;
> pm3d_last_set_palette_mode = SMPAL_COLOR_MODE_NONE;
> }
> Notice that sm_palette.gradient is simply set to NULL.
Yup.
Notice also that sm_palette.color is neither freed nor set
to NULL. I wonder if this contributes to your main problem
of incorrect palette comparisons.
--
Ethan A Merritt
Biomolecular Structure Center
University of Washington, Seattle 98195-7742
|