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.
This commit is contained in:
Ramiro Estrugo 2000-07-14 18:23:18 +00:00
parent 17d42507a1
commit f89aede974
2 changed files with 20 additions and 9 deletions

View file

@ -1,3 +1,14 @@
2000-07-14 Ramiro Estrugo <ramiro@eazel.com>
* 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.
2000-07-14 Pavel Cisler <pavel@eazel.com>
* libnautilus-extensions/nautilus-list.c:

View file

@ -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)
{