forked from old/legacy-imlib2
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:
parent
54599eddb6
commit
5303cd3cf1
|
@ -492,6 +492,7 @@ imlib_free_image_and_decache(void)
|
||||||
CHECK_PARAM_POINTER("imlib_free_image_and_decache", "image", ctxt_image);
|
CHECK_PARAM_POINTER("imlib_free_image_and_decache", "image", ctxt_image);
|
||||||
CAST_IMAGE(im, ctxt_image);
|
CAST_IMAGE(im, ctxt_image);
|
||||||
SET_FLAG(im->flags, F_INVALID);
|
SET_FLAG(im->flags, F_INVALID);
|
||||||
|
SET_FLAG(im->flags, F_UNCACHEABLE);
|
||||||
__imlib_FreeImage(im);
|
__imlib_FreeImage(im);
|
||||||
ctxt_image = NULL;
|
ctxt_image = NULL;
|
||||||
}
|
}
|
||||||
|
|
1429
src/image.c
1429
src/image.c
File diff suppressed because it is too large
Load Diff
Loading…
Reference in New Issue