fix a leak in vips7 support

there was a ref cycle being created in file2vips ... fixed
This commit is contained in:
John Cupitt 2012-07-13 12:26:51 +01:00
parent 205f13eccb
commit 3476e39c7e
2 changed files with 1 additions and 25 deletions

12
TODO
View File

@ -1,15 +1,3 @@
- load a vips image in nip2
enter
insert 100 0 A1 A1
save as vips .. leak!
save as jpg, no leak, wtf
- try
vips im_extract_bands /tmp/input.tiff /tmp/out.tif 0 3

View File

@ -379,18 +379,6 @@ file2vips( const char *filename, IMAGE *out )
return( 0 );
}
static int
vips2file( IMAGE *im, const char *filename )
{
IMAGE *out;
if( !(out = im_open_local( im, filename, "w" )) ||
im_copy( im, out ) )
return( -1 );
return( 0 );
}
static VipsFormatFlags
vips_flags( const char *filename )
{
@ -426,7 +414,7 @@ vips_format_vips_class_init( VipsFormatVipsClass *class )
format_class->is_a = im_isvips;
format_class->header = file2vips;
format_class->load = file2vips;
format_class->save = vips2file;
format_class->save = vips_image_write_to_file;
format_class->get_flags = vips_flags;
format_class->suffs = vips_suffs;
}