[GRASS-dev] Re: [GRASS-SVN] r38597 - grass/trunk/vector/v.in.ogr

Hamish hamish_b at yahoo.com
Sat Aug 22 10:34:05 EDT 2009


Juergen:
> Yes.  Ogr_fieldname is freed later with G_free(), so it needs
> to be allocated using a G_*() function like G_strdup().

note that G_free() isn't anything special, it just does:

/**
 * \brief Free allocated memory.
 *
 * \param[in,out] buf buffer holding original data
 */

void G_free(void *buf)
{
    free(buf);
}


most of the G_malloc() stuff justs adds bounds checking and
prepares error messages; there are no #ifdefs in lib/gis/alloc.c
for Windows. I can't say that won't change in the future, but
for now...


Hamish



      



More information about the grass-dev mailing list