AndyRock - not quite sure I understand the valgrind
in this bit of code:
tatic gboolean monitor_callback_delayed (gpointer user_data) { MonitorCallbackInfo *info; MenuMonitorEventInfo *event_info; MenuMonitorEvent event; MenuMonitor *menu_monitor;
info = (MonitorCallbackInfo *) user_data; menu_monitor = info->menu_monitor;
if (info->weak_ptr) { switch (info->eflags) { case G_FILE_MONITOR_EVENT_CHANGED: event = MENU_MONITOR_EVENT_CHANGED; break; case G_FILE_MONITOR_EVENT_CREATED: event = MENU_MONITOR_EVENT_CREATED; break; case G_FILE_MONITOR_EVENT_DELETED: event = MENU_MONITOR_EVENT_DELETED; break; default: event = MENU_MONITOR_EVENT_INVALID; }
if (event != MENU_MONITOR_EVENT_INVALID) { event_info = g_new0 (MenuMonitorEventInfo, 1);
event_info->path = g_file_get_path (info->child); event_info->event = event; event_info->monitor = menu_monitor;
menu_monitor_queue_event (event_info); }
}
g_object_unref (info->child); g_free (info); return FALSE; }
should the info->weak_ptr be removed immediately after menu_monitor_queue_event? maybe the g_free(info) is cleaning up the object first but info->weak_ptr is being cleaned up after the info object is removed.
AndyRock - not quite sure I understand the valgrind
in this bit of code:
tatic gboolean callback_ delayed (gpointer user_data) ckInfo *info; entInfo *event_info;
monitor_
{
MonitorCallba
MenuMonitorEv
MenuMonitorEvent event;
MenuMonitor *menu_monitor;
info = (MonitorCallbac kInfo *) user_data;
menu_monitor = info->menu_monitor;
if (info->weak_ptr) MONITOR_ EVENT_CHANGED: EVENT_CHANGED; MONITOR_ EVENT_CREATED: EVENT_CREATED; MONITOR_ EVENT_DELETED: EVENT_DELETED; EVENT_INVALID;
{
switch (info->eflags)
{
case G_FILE_
event = MENU_MONITOR_
break;
case G_FILE_
event = MENU_MONITOR_
break;
case G_FILE_
event = MENU_MONITOR_
break;
default:
event = MENU_MONITOR_
}
if (event != MENU_MONITOR_ EVENT_INVALID)
event_ info = g_new0 (MenuMonitorEve ntInfo, 1);
{
}
}
g_object_unref (info->child);
g_free (info);
return FALSE;
}
should the info->weak_ptr be removed immediately after menu_monitor_ queue_event? maybe the g_free(info) is cleaning up the object first but info->weak_ptr is being cleaned up after the info object is removed.