diff options
author | Ramiro Estrugo <ramiro@src.gnome.org> | 2000-07-14 18:23:18 +0000 |
---|---|---|
committer | Ramiro Estrugo <ramiro@src.gnome.org> | 2000-07-14 18:23:18 +0000 |
commit | f89aede974c81e2054f7639af351ac69569c784a (patch) | |
tree | a65f3eb7383d91c5b12058cd5729533f92b95794 /test | |
parent | 17d42507a188a311b23a6265d550f4251bddb699 (diff) | |
download | nautilus-f89aede974c81e2054f7639af351ac69569c784a.tar.gz |
Yank the leak checker intitialization code. Its not needed no more cause
* src/nautilus-main.c: (main):
Yank the leak checker intitialization code. Its not needed no
more cause the leak checker automatically does it when its
pre loaded.
* test/nautilus-leak-checker.c: (print_leaks_at_exit),
(__libc_start_main), (nautilus_leak_print_leaks):
Call atexit() with the leak dumping function.
Diffstat (limited to 'test')
-rw-r--r-- | test/nautilus-leak-checker.c | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/test/nautilus-leak-checker.c b/test/nautilus-leak-checker.c index 01c8fa420..00dfee618 100644 --- a/test/nautilus-leak-checker.c +++ b/test/nautilus-leak-checker.c @@ -57,7 +57,7 @@ int (* real_start_main) (int (*main) (int, char **, char **), int argc, -const char *app_path; +static const char *app_path; void nautilus_leak_allocation_record_init (NautilusLeakAllocationRecord *record, @@ -510,6 +510,13 @@ __libc_free (void *ptr) (real_free) (ptr); } +static void +print_leaks_at_exit (void) +{ + /* If leak checking, dump all the outstanding allocations just before exiting. */ + nautilus_leak_print_leaks (8, 15, 100, TRUE); +} + int __libc_start_main (int (*main) (int, char **, char **), int argc, char **argv, void (*init) (void), void (*fini) (void), @@ -519,7 +526,7 @@ __libc_start_main (int (*main) (int, char **, char **), int argc, nautilus_leak_checker_init (argv[0]); - printf ("once\n"); + g_atexit (print_leaks_at_exit); return real_start_main (main, argc, argv, init, fini, rtld_fini, stack_end); } @@ -607,13 +614,6 @@ nautilus_leak_print_leaks (int stack_grouping_depth, int stack_print_depth, nautilus_leak_print_symbol_cleanup (); } -static void -print_leaks_at_exit (void) -{ - /* If leak checking, dump all the outstanding allocations just before exiting. */ - nautilus_leak_print_leaks (8, 15, 40, TRUE); -} - void nautilus_leak_checker_init (const char *path) { |