mirror of
https://github.com/irssi/irssi.git
synced 2026-08-10 12:23:37 +02:00
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
This commit is contained in:
parent
8fe52e2041
commit
0e61b4c829
5 changed files with 37 additions and 31 deletions
|
|
@ -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();
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue