fix a refleak
This commit is contained in:
parent
e9e23536eb
commit
4367ccb177
35
TODO
35
TODO
|
@ -1,11 +1,38 @@
|
||||||
- try:
|
- do we need vips_object_unref_outputs() in more places? check all calls to
|
||||||
|
_build()
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
- how about
|
||||||
|
|
||||||
|
vips max add[babe.jpg,babe2.jpg]
|
||||||
|
|
||||||
|
does that make any sense?
|
||||||
|
|
||||||
|
vips copy add[babe.jpg,add[babe2.jpg,babe3.jpg]] sum.v
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
$ vips copy z.tif[page=12] babe.v
|
|
||||||
|
|
||||||
get a couple of leaked objects from the error
|
|
||||||
|
|
||||||
- make im_tiff2vips.c into a stub
|
- make im_tiff2vips.c into a stub
|
||||||
|
|
||||||
|
- what should we do?
|
||||||
|
|
||||||
|
vips_image_new_from_file( "x.tif[page=12]" );
|
||||||
|
|
||||||
|
or maybe:
|
||||||
|
|
||||||
|
vips_image_new_from_file( "x.tif", "page", 12, NULL );
|
||||||
|
|
||||||
|
or maybe neither? we'd like this to work though:
|
||||||
|
|
||||||
|
header x.tif[page=12]
|
||||||
|
|
||||||
|
object_new_from_string()?
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
@ -20,8 +47,6 @@
|
||||||
- "header fred.png" does not work, since header uses im_open() which uses
|
- "header fred.png" does not work, since header uses im_open() which uses
|
||||||
VipsForeign
|
VipsForeign
|
||||||
|
|
||||||
- "header x.tif[page=7]" does not work
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -1280,16 +1280,20 @@ vips_object_set_argument_from_string( VipsObject *object,
|
||||||
|
|
||||||
if( vips_cache_operation_build(
|
if( vips_cache_operation_build(
|
||||||
(VipsOperation **) &new_object ) ) {
|
(VipsOperation **) &new_object ) ) {
|
||||||
|
/* The build may have made some output objects before
|
||||||
|
* failing.
|
||||||
|
*/
|
||||||
|
vips_object_unref_outputs( new_object );
|
||||||
g_object_unref( new_object );
|
g_object_unref( new_object );
|
||||||
return( -1 );
|
return( -1 );
|
||||||
}
|
}
|
||||||
|
|
||||||
g_object_get( new_object, "out", &out, NULL );
|
g_object_get( new_object, "out", &out, NULL );
|
||||||
|
|
||||||
/* Getting @out will have upped it's count and we want to
|
/* Getting @out will have upped its count so it'll be safe.
|
||||||
* hold the only ref to it.
|
* We can junk all other outputs,
|
||||||
*/
|
*/
|
||||||
g_object_unref( out );
|
vips_object_unref_outputs( new_object );
|
||||||
|
|
||||||
/* @out holds a ref to new_object, we can drop ours.
|
/* @out holds a ref to new_object, we can drop ours.
|
||||||
*/
|
*/
|
||||||
|
|
Loading…
Reference in New Issue