[GRASS-dev] Re: [GRASS GIS] #863: set_env/unset_env should release
memory
GRASS GIS
trac at osgeo.org
Tue Jan 12 14:49:34 EST 2010
#863: set_env/unset_env should release memory
--------------------------+-------------------------------------------------
Reporter: rblazek | Owner: grass-dev at lists.osgeo.org
Type: enhancement | Status: new
Priority: normal | Milestone: 6.5.0
Component: libgis | Version: svn-trunk
Resolution: | Keywords:
Platform: All | Cpu: Unspecified
--------------------------+-------------------------------------------------
Comment (by glynn):
Replying to [ticket:863 rblazek]:
> set_env/unset_env should release memory allocated for previously set
value if a name is reused/deleted.
That would require G!__getenv() to duplicate the value. Currently, it just
returns the pointer. As the caller may hold onto the pointer indefinitely,
the library cannot free it. Duplicating the value would require the caller
to free it.
I'm not sure this is worth it. Do any GRASS modules call G_setenv()
repeatedly?
--
Ticket URL: <http://trac.osgeo.org/grass/ticket/863#comment:2>
GRASS GIS <http://grass.osgeo.org>
More information about the grass-dev
mailing list