Okay. imlib_free_image_and_decache() was leaking images. I hope I made the

right fix here. Basically, the imlib_free_image_and_decache() call in api.c
sets the flag F_INVALID then calls the internal __ImlibFreeImage(), this
checks if the flag F_UNCACHEABLE is set, and only frees it if so.

So the image never got free()d. I have changed the
imlib_free_image_and_decache() to set the F_UNCACHEABLE flag *as well* as
F_INVALID. I hope that's the correct fix. raster?


SVN revision: 3238
This commit is contained in:
Tom Gilbert 2000-08-23 00:11:39 +00:00
parent 54599eddb6
commit 5303cd3cf1
2 changed files with 722 additions and 708 deletions

View File

@ -492,6 +492,7 @@ imlib_free_image_and_decache(void)
CHECK_PARAM_POINTER("imlib_free_image_and_decache", "image", ctxt_image);
CAST_IMAGE(im, ctxt_image);
SET_FLAG(im->flags, F_INVALID);
SET_FLAG(im->flags, F_UNCACHEABLE);
__imlib_FreeImage(im);
ctxt_image = NULL;
}

File diff suppressed because it is too large Load Diff