Ejemplo n.º 1
0
/**
 * vips_shutdown:
 *
 * Call this to drop caches and close plugins. Run with "--vips-leak" to do 
 * a leak check too. May be called many times.
 */
void
vips_shutdown( void )
{
#ifdef DEBUG
	printf( "vips_shutdown:\n" );
#endif /*DEBUG*/

	vips_cache_drop_all();
	im_close_plugins();

	/* In dev releases, always show leaks. But not more than once, it's
	 * annoying.
	 */
#ifndef DEBUG_LEAK
	if( vips__leak ) 
#endif /*DEBUG_LEAK*/
	{
		static gboolean done = FALSE;

		if( !done ) 
			vips_leak();

		done = TRUE;
	}
}
Ejemplo n.º 2
0
/**
 * vips_shutdown:
 *
 * Call this to drop caches and close plugins. Run with "--vips-leak" to do 
 * a leak check too. 
 *
 * You may call VIPS_INIT() many times and vips_shutdown() many times, but you 
 * must not call VIPS_INIT() after vips_shutdown(). In other words, you cannot
 * stop and restart vips. 
 */
void
vips_shutdown( void )
{
#ifdef DEBUG
	printf( "vips_shutdown:\n" );
#endif /*DEBUG*/

	vips_cache_drop_all();

	im_close_plugins();

	/* Mustn't run this more than once. Don't use the VIPS_GATE macro,
	 * since we don't for gate start.
	 */
{
	static gboolean done = FALSE;

	if( !done ) 
		vips__thread_gate_stop( "init: main" ); 
}

	vips__render_shutdown();

	vips_thread_shutdown();

	vips__thread_profile_stop();

#ifdef HAVE_GSF
	gsf_shutdown(); 
#endif /*HAVE_GSF*/

	/* In dev releases, always show leaks. But not more than once, it's
	 * annoying.
	 */
#ifndef DEBUG_LEAK
	if( vips__leak ) 
#endif /*DEBUG_LEAK*/
	{
		static gboolean done = FALSE;

		if( !done ) 
			vips_leak();

		done = TRUE;
	}
}