From 0e61b4c8296d554065d934a4a0c27bed8603d3de Mon Sep 17 00:00:00 2001 From: Timo Sirainen Date: Sat, 25 Jan 2003 03:19:40 +0000 Subject: Lets see if GC happens to work now without explicit free() calls. Perl objects now set the C pointer to NULL once they're done with it, so this might just work without leaking.. git-svn-id: http://svn.irssi.org/repos/irssi/trunk@3101 dbcabf3a-b0e7-0310-adc4-f8d773084564 --- src/fe-text/irssi.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'src/fe-text') diff --git a/src/fe-text/irssi.c b/src/fe-text/irssi.c index b2a5e955..e397a511 100644 --- a/src/fe-text/irssi.c +++ b/src/fe-text/irssi.c @@ -309,12 +309,13 @@ static void winsock_init(void) } #endif -#if defined (HAVE_GC_H) || defined (HAVE_GC_GC_H) +#ifdef USE_GC #ifdef HAVE_GC_H # include #else # include #endif + GMemVTable gc_mem_table = { GC_malloc, GC_realloc, @@ -331,7 +332,7 @@ int main(int argc, char **argv) { NULL, '\0', 0, NULL } }; -#ifdef HAVE_GC +#ifdef USE_GC g_mem_set_vtable(&gc_mem_table); #endif @@ -377,7 +378,8 @@ int main(int argc, char **argv) /* Does the same as g_main_run(main_loop), except we can call our dirty-checker after each iteration */ while (!quitting) { - if (!dummy) term_refresh_freeze(); + GC_collect_a_little(); + if (!dummy) term_refresh_freeze(); g_main_iteration(TRUE); if (!dummy) term_refresh_thaw(); -- cgit v1.2.3