g_free() vs. free()



Is it ok to call plain old free() vs. g_free() on
memory returned from functions such as
gtk_editable_get_chars()? GTK documentation says that
these functions use g_malloc() to allocate the memory
they return. I think I read that the g_malloc()
function maintains it's own list of allocated
addresses.. Would it be advantageous or would it not
matter to call g_free() on this memory? I am thinking
that using g_free would simply notifies the whatever
mechanism GLib uses to keep track of memory that has
been allocated. Any ideas?

Regards,

Farooq

__________________________________________________
Do You Yahoo!?
Kick off your party with Yahoo! Invites.
http://invites.yahoo.com/




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