src/gedlib/node.c
/*=================================================
 * check_node_leaks -- Called when database closing
 *  for debugging
 *===============================================*/
- Called when database closing
for debugging
- Called when database closing for debugging
void
check_node_leaks (void)
{
	if (live_count) {
		STRING report_leak_path = getlloptstr("ReportLeakLog", NULL);
		FILE * fp=0;
		if (report_leak_path)
			fp = fopen(report_leak_path, LLAPPENDTEXT);
		if (fp) {
			LLDATE date;
			get_current_lldate(&date);
			fprintf(fp, _("Node memory leaks:"));
			fprintf(fp, " %s", date.datestr);
			fprintf(fp, "\n  ");
			fprintf(fp, _pl("%d item leaked", "%d items leaked", live_count), live_count);
			fprintf(fp, "\n");
			fclose(fp);
			fp = 0;
		}
	}
}
void check_node_leaks ( void ) { if ( live_count ) { STRING report_leak_path = getlloptstr ( " " , NULL ) ; FILE * fp = 0 ; if ( report_leak_path ) fp = fopen ( report_leak_path , LLAPPENDTEXT ) ; if ( fp ) { LLDATE date ; get_current_lldate ( & date ) ; fprintf ( fp , _ ( " " ) ) ; fprintf ( fp , " " , date . datestr ) ; fprintf ( fp , " \n " ) ; fprintf ( fp , _pl ( " " , " " , live_count ) , live_count ) ; fprintf ( fp , " \n " ) ; fclose ( fp ) ; fp = 0 ; } } }
check_node_leaks -- Called when database closing
  for debugging
check_node_leaks -- Called when database closing for debugging