File tree Expand file tree Collapse file tree 2 files changed +9
-5
lines changed Expand file tree Collapse file tree 2 files changed +9
-5
lines changed Original file line number Diff line number Diff line change @@ -262,8 +262,11 @@ process_events(void)
262262
263263 /* Block too much recursion. 0 is from the top-level, 1 is from a
264264 * callback, we don't want any more than that.
265+ *
266+ * No need to process in batch mode.
265267 */
266- if (g_main_depth () < 2 ) {
268+ if (!main_option_batch &&
269+ g_main_depth () < 2 ) {
267270 int n ;
268271
269272 for (n = 0 ; n < max_events &&
Original file line number Diff line number Diff line change 4848
4949static iObjectClass * parent_class = NULL ;
5050
51- static GSList * heap_all = NULL ;
51+ static int n_heap = 0 ;
5252
5353/* Call a function, passing in a "safe" PElement ... ie. the PElement points
5454 * at a fresh element which will be safe from the GC.
@@ -199,7 +199,8 @@ heap_sanity(Heap *heap)
199199void
200200heap_check_all_destroyed (void )
201201{
202- slist_map (heap_all , (SListMapFn ) iobject_dump , NULL );
202+ if (n_heap > 0 )
203+ printf ("unfreed heap!! n_heap = %d\n" , n_heap );
203204}
204205
205206/* Free a HeapBlock.
@@ -269,7 +270,7 @@ heap_finalize(GObject *gobject)
269270
270271 VIPS_FREEF (g_hash_table_destroy , heap -> mtable );
271272
272- heap_all = g_slist_remove ( heap_all , heap ) ;
273+ n_heap -= 1 ;
273274
274275 G_OBJECT_CLASS (parent_class )-> finalize (gobject );
275276}
@@ -406,7 +407,7 @@ heap_init(Heap *heap)
406407
407408 heap -> flush = FALSE;
408409
409- heap_all = g_slist_prepend ( heap_all , heap ) ;
410+ n_heap += 1 ;
410411}
411412
412413GType
You can’t perform that action at this time.
0 commit comments