Re: [fprint] Memory management Libfprint

2021-04-22 Thread Benjamin Berg
er thread. >   > Thanks for your support. >   > From: Benjamin Berg > Sent: Wednesday, April 21, 2021 3:30 AM > To: Carlos Garcia; fprint@lists.freedesktop.org > Subject: Re: [fprint] Memory management Libfprint >   > Hi Carlos, >   > the image returned by fp_d

Re: [fprint] Memory management Libfprint

2021-04-22 Thread Benjamin Berg
> >   > > When g_cancellable_cancel is invoked, it needs to be invoked with > > g_idle_add. > >   > > The g_main_loop_run is running on another thread. > >   > > Thanks for your support. > >   > > From: Benjamin Berg > > Sent: Wednesday, Apri

Re: [fprint] Memory management Libfprint

2021-04-22 Thread Benjamin Berg
e_add. >   > The g_main_loop_run is running on another thread. >   > Thanks for your support. >   > From: Benjamin Berg > Sent: Wednesday, April 21, 2021 3:30 AM > To: Carlos Garcia; fprint@lists.freedesktop.org > Subject: Re: [fprint] Memory management Libfprint >

Re: [fprint] Memory management Libfprint

2021-04-21 Thread Benjamin Berg
Hi Carlos, the image returned by fp_device_capture_finish is owned by your code (marked as "transfer full"). It is a GObject, and you are responsible to eventually call g_object_unref on it. There are various ways of achieving that. If you can use the modern GLib autoptr features, then I would su

[fprint] Memory management Libfprint

2021-04-20 Thread Carlos Garcia
Hi everyone. I have some questions with the memory management with libfprint. I’m creating a program for capture image and retrieve the minutiae from the captured image. I’m using: * fp_device_capture * fp_device_capture_finish * fp_image_detect_minutiae * fp_image_detect_minuti