always unset and ref the histograms. Plugs a memory leak reported by
2008-07-21 Sven Neumann <sven@gimp.org> * app/widgets/gimphistogrameditor.c (gimp_histogram_editor_set_image): always unset and ref the histograms. Plugs a memory leak reported by valgrind. svn path=/trunk/; revision=26263
This commit is contained in:

committed by
Sven Neumann

parent
862b2a2913
commit
c610b2daad
@ -1,3 +1,9 @@
|
|||||||
|
2008-07-21 Sven Neumann <sven@gimp.org>
|
||||||
|
|
||||||
|
* app/widgets/gimphistogrameditor.c
|
||||||
|
(gimp_histogram_editor_set_image): always unset and ref the
|
||||||
|
histograms. Plugs a memory leak reported by valgrind.
|
||||||
|
|
||||||
2008-07-21 Simon Budig <simon@gimp.org>
|
2008-07-21 Simon Budig <simon@gimp.org>
|
||||||
|
|
||||||
* app/core/gimpcoords.c: incorporate the velocity.
|
* app/core/gimpcoords.c: incorporate the velocity.
|
||||||
|
@ -77,7 +77,7 @@ static GimpDockedInterface *parent_docked_iface = NULL;
|
|||||||
|
|
||||||
|
|
||||||
static void
|
static void
|
||||||
gimp_histogram_editor_class_init (GimpHistogramEditorClass* klass)
|
gimp_histogram_editor_class_init (GimpHistogramEditorClass *klass)
|
||||||
{
|
{
|
||||||
GimpImageEditorClass *image_editor_class = GIMP_IMAGE_EDITOR_CLASS (klass);
|
GimpImageEditorClass *image_editor_class = GIMP_IMAGE_EDITOR_CLASS (klass);
|
||||||
|
|
||||||
@ -256,22 +256,22 @@ gimp_histogram_editor_set_image (GimpImageEditor *image_editor,
|
|||||||
g_signal_handlers_disconnect_by_func (image_editor->image,
|
g_signal_handlers_disconnect_by_func (image_editor->image,
|
||||||
gimp_histogram_editor_menu_update,
|
gimp_histogram_editor_menu_update,
|
||||||
editor);
|
editor);
|
||||||
|
}
|
||||||
|
|
||||||
if (editor->histogram)
|
if (editor->histogram)
|
||||||
{
|
{
|
||||||
gimp_histogram_unref (editor->histogram);
|
gimp_histogram_unref (editor->histogram);
|
||||||
editor->histogram = NULL;
|
editor->histogram = NULL;
|
||||||
|
|
||||||
gimp_histogram_view_set_histogram (view, NULL);
|
gimp_histogram_view_set_histogram (view, NULL);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (editor->bg_histogram)
|
if (editor->bg_histogram)
|
||||||
{
|
{
|
||||||
gimp_histogram_unref (editor->bg_histogram);
|
gimp_histogram_unref (editor->bg_histogram);
|
||||||
editor->bg_histogram = NULL;
|
editor->bg_histogram = NULL;
|
||||||
|
|
||||||
gimp_histogram_view_set_background (view, NULL);
|
gimp_histogram_view_set_background (view, NULL);
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
GIMP_IMAGE_EDITOR_CLASS (parent_class)->set_image (image_editor, image);
|
GIMP_IMAGE_EDITOR_CLASS (parent_class)->set_image (image_editor, image);
|
||||||
|
Reference in New Issue
Block a user