matteo poletti wrote:
> I am debugging my code to find memory leak. I have a memory leak
> that I am not able to find. Is it possible that there is a memory
> leak in the function G__open_cell_old declared in opencell.c?
>
> It is the first time that I deal with the gis library code so please
> forgive me if I misunderstand the code.
>
> I do not understand why the variable gdal is not freed at the end of
> the function.
Because it's "owned" by the fileinfo structure; line 311:
fcb->gdal = gdal;
The structure is freed on line 131 of closecell.c:
130 if (fcb->gdal)
131 G_close_gdal_link(fcb->gdal);
http://grass.osgeo.org/programming6/closecell_8c_source.html#l00130
--
Glynn Clements <[email protected]>
_______________________________________________
grass-dev mailing list
[email protected]
http://lists.osgeo.org/mailman/listinfo/grass-dev