[gtkmm] memcheck for my gtkmm app



Hi all,

I am doing memcheck on my gtkmm application using
valgrind.  But I donot quite understand the result
about the mem leak. There are two major leaks where in
the first place I connected a handler to the
signal_row_changed() of a treeview, and in the second
place I change the cursor on a Gtk::Window. 
Can anyone tell me if I have done anything wrong or
they are just false alarms? Thanks.

Cheers,
Dan

The output is as follows:

==5828== 5244 bytes in 137 blocks are definitely lost
in loss record 132 of 150
==5828==    at 0x40029507: __builtin_new
(vg_replace_malloc.c:172)
==5828==    by 0x4002955E: operator new(unsigned)
(vg_replace_malloc.c:185)
==5828==    by 0x407569C8:
Glib::SignalProxyNormal::connect_impl_(void (*)(),
SigC::SlotBase const&, bool) (signalproxy.cc:69)
==5828==    by 0x4075696B:
Glib::SignalProxyNormal::connect_(SigC::SlotBase
const&, bool) (signalproxy.cc:56)
==5828==    by 0x80D2F6F: Glib::SignalProxy2<void,
Gtk::TreePath const&, Gtk::TreeIter
const&>::connect(SigC::Slot2<void, Gtk::TreePath
const&, Gtk::TreeIter const&> const&, bool)
(signalproxy.h:159)
==5828==    by 0x80D220D:
App_GUI::CApp_Table_Frame::enable_change_notification(bool)
(my_frame.cc:23)
==5828==    by 0x80D2A75:
App_GUI::CApp_Table_Frame::on_row_changed(Gtk::TreePath
const&, Gtk::TreeIter const&) (my_frame.cc:96)
==5828==    by 0x80D34F0: SigC::ObjectSlot2_<void,
Gtk::TreePath const&, Gtk::TreeIter const&,
App_GUI::CApp_Table_Frame>::proxy(Gtk::TreePath
const&, Gtk::TreeIter const&, void*)
(object_slot.h:138)
==5828==    by 0x4038FC54: (anonymous
namespace)::TreeModel_signal_row_changed_callback(_GtkTreeModel*,
_GtkTreePath*, _GtkTreeIter*, void*)
(treemodel.cc:160)
==5828==    by 0x40589EAA:
_gtk_marshal_VOID__BOXED_BOXED (in
/usr/lib/libgtk-x11-2.0.so.0.200.1)
==5828==    by 0x4087BED6: g_closure_invoke (in
/usr/lib/libgobject-2.0.so.0.200.1)
==5828==    by 0x4088E825: (within
/usr/lib/libgobject-2.0.so.0.200.1)
==5828==    by 0x4088D9A7: g_signal_emit_valist (in
/usr/lib/libgobject-2.0.so.0.200.1)
==5828==    by 0x4088DBE3: g_signal_emit (in
/usr/lib/libgobject-2.0.so.0.200.1)
==5828==    by 0x40637B9A: gtk_tree_model_row_changed
(in /usr/lib/libgtk-x11-2.0.so.0.200.1)
==5828==    by 0x40642809: gtk_tree_store_set_value
(in /usr/lib/libgtk-x11-2.0.so.0.200.1)
==5828==    by 0x4039396E:
Gtk::TreeStore::set_value_impl(Gtk::TreeIter const&,
int, Glib::ValueBase const&) (treestore.h:90)
==5828==    by 0x4038F442:
Gtk::TreeRow::set_value_impl(int, Glib::ValueBase
const&) const (treeiter.cc:162)
==5828==    by 0x809FF35: void
Gtk::TreeRow::set_value<int>(Gtk::TreeModelColumn<int>
const&, int const&) const (treeiter.h:327)
==5828==    by 0x809F41F:
Gtk::TreeValueProxy<int>::operator=(int const&)
(treeiter.h:299)
==5828==
==5828==


==5828== 6272 bytes in 396 blocks are definitely lost
in loss record 134 of 150
==5828==    at 0x4002942A: malloc
(vg_replace_malloc.c:153)
==5828==    by 0x408D8558: g_malloc (in
/usr/lib/libglib-2.0.so.0.200.1)
==5828==    by 0x407AA567: gdk_cursor_new_for_display
(in /usr/lib/libgdk-x11-2.0.so.0.200.1)
==5828==    by 0x4078BC97: gdk_cursor_new (in
/usr/lib/libgdk-x11-2.0.so.0.200.1)
==5828==    by 0x4045B336:
Gdk::Cursor::Cursor(Gdk::CursorType) (cursor.cc:36)
==5828==    by 0x80D4E5F:
App_Graphics::CApp_Canvas::canvas_mousemove_cb(_GdkEventMotion*)
(my_canvas.cc:83)
==5828==    by 0x80B6FB7:
CApp_Camera_Canvas::canvas_mousemove_cb(_GdkEventMotion*)
(my_camera_canvas.cc:31)
==5828==    by 0x80D5B81: SigC::ObjectSlot1_<bool,
_GdkEventMotion*,
App_Graphics::CApp_Canvas>::proxy(_GdkEventMotion*
const&, void*) (object_slot.h:100)
==5828==    by 0x4039DE99: (anonymous
namespace)::Widget_signal_motion_notify_event_callback(_GtkWidget*,
_GdkEventMotion*, void*) (widget.cc:1026)
==5828==    by 0x40588C2E: _gtk_marshal_BOOLEAN__BOXED
(in /usr/lib/libgtk-x11-2.0.so.0.200.1)
==5828==    by 0x4087BED6: g_closure_invoke (in
/usr/lib/libgobject-2.0.so.0.200.1)
==5828==    by 0x4088E825: (within
/usr/lib/libgobject-2.0.so.0.200.1)
==5828==    by 0x4088D7AE: g_signal_emit_valist (in
/usr/lib/libgobject-2.0.so.0.200.1)
==5828==    by 0x4088DBE3: g_signal_emit (in
/usr/lib/libgobject-2.0.so.0.200.1)
==5828==    by 0x4066E6FA: (within
/usr/lib/libgtk-x11-2.0.so.0.200.1)
==5828==    by 0x40588A26: gtk_propagate_event (in
/usr/lib/libgtk-x11-2.0.so.0.200.1)
==5828==    by 0x40587724: gtk_main_do_event (in
/usr/lib/libgtk-x11-2.0.so.0.200.1)
==5828==    by 0x407B61A4: (within
/usr/lib/libgdk-x11-2.0.so.0.200.1)
==5828==    by 0x408D2B34: (within
/usr/lib/libglib-2.0.so.0.200.1)
==5828==    by 0x408D3B77: g_main_context_dispatch (in
/usr/lib/libglib-2.0.so.0.200.1)



=====
----------------------------------------------------------
Have fun!
__________________________________________________________

__________________________________
Do you Yahoo!?
Yahoo! SiteBuilder - Free, easy-to-use web site design software
http://sitebuilder.yahoo.com



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]