Re: [PATCH] [RFC] Add g_*_deinit() API

On 09/30/2010 05:04 PM, Zeeshan Ali (Khattak) wrote:
> On Wed, Sep 29, 2010 at 4:49 PM, Matthias Clasen
> <matthias clasen gmail com> wrote:
>> On Wed, Sep 29, 2010 at 9:46 AM, Ole André Vadla Ravnås
>> <oleavr gmail com> wrote:
>>> I'm currently working on adding API to GLib/GObject/GIO for explicitly
>>> cleaning up statically allocated resources, like TLS keys, threads,
>>> handles, heap blocks, etc.
>>> This is clearly not useful to regular GLib-based applications where
>>> GLib has the same life-time as the host process itself, so such
>>> applications/libraries will behave just like before, because they
>>> won't be calling any deinit functions at exit/unload.  However, in
>>> certain applications, like for example Frida
>>> (, there is a shared library which
>>> has its own private copy of GLib/GObject/GIO statically linked in, and
>>> this library gets injected into already running applications in order
>>> to do runtime instrumentation of APIs and things like that.
>> Lets just say: don't do that ?
>   Sounds like a perfectly valid use-case to me so shouldn't the
> question rather be "Why not?".

I definitely agree, why not?
Also, it would finally make Glib work with valgrind without having to use
ridiculous suppression files (that may or may not work on your computer).. and
also other non-valgrind tools (that may not support suppressions).

Attachment: signature.asc
Description: OpenPGP digital signature

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