Re: Paranthesis problem in memory documentation



Hi Mohan

On 2014-11-12 17:28, Mohan <dr_mohan yahoo com> wrote:
Hello,
https://developer.gnome.org/glib/stable/glib-Memory-Allocation.htmlweb page has the following in the 
Description"
It's important to match g_malloc() (and wrappers such as g_new()) withg_free(), g_slice_alloc() and wrappers such 
as g_slice_new()) withg_slice_free(), plain malloc() with free(), and (if you're using C++)new with delete and 
new[] with delete[]. Otherwise bad things can happen,since these allocators may use different memory pools (and 
new/delete callconstructors and destructors). See also g_mem_set_vtable()."
Looks like
the "(" before and wrappers, 
and
")" after as g_slice_new()
needs to be removed. g_malloc() does not go well with g_slice_free(), please check.

Thanks for the report. In fact, an opening parenthesis is missing, and I fixed that in glib master:

https://git.gnome.org/browse/glib/commit/?id=61cecd5a68743542baf685b47e8a4a5f4a98d205

The fix will be in the next unstable release.

--
http://amigadave.com/

Attachment: signature.asc
Description: Digital signature



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