summaryrefslogtreecommitdiff
path: root/src/fe-text/irssi.c
diff options
context:
space:
mode:
authorTimo Sirainen <cras@irssi.org>2003-01-25 03:19:40 +0000
committercras <cras@dbcabf3a-b0e7-0310-adc4-f8d773084564>2003-01-25 03:19:40 +0000
commit0e61b4c8296d554065d934a4a0c27bed8603d3de (patch)
tree11041d8560a2cc69ba8aae34b4ef8b26a47203f5 /src/fe-text/irssi.c
parent8fe52e204147fcda0699badc2b1511e9c456ef97 (diff)
downloadirssi-0e61b4c8296d554065d934a4a0c27bed8603d3de.zip
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
Diffstat (limited to 'src/fe-text/irssi.c')
-rw-r--r--src/fe-text/irssi.c8
1 files changed, 5 insertions, 3 deletions
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 <gc.h>
#else
# include <gc/gc.h>
#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();