Re: GIO Async. user data life time



On 12 August 2011 15:54, Dan Winship <danw gnome org> wrote:
> On 08/12/2011 10:15 AM, Matthew Bucknall wrote:
>> Any better suggestions would be much appreciated. I'm hoping the
>> answer won't be that it doesn't matter if user data doesn't get
>> cleaned up because if the main loop stops the program is usually
>> terminating anyway - I know this is the attitude taken in some parts
>> of glib. In my particular case, cleanup does matter.
>
> But if you start an async operation and then don't let it finish, you're
> going to be leaking memory inside libgio anyway even if you figure out a
> way to not leak your own objects. So I think cancelling all the
> outstanding ops and waiting for them to finish really is the best solution.
>
> -- Dan
>

Point taken, thanks for confirming that we've taken the right
approach. I suppose this is really the kind of thing
g_application_hold/g_application_release are meant for. The main loop
stuff in the current project I'm working on pre-dates GApplication, so
I rolled my own equivalent.


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]