Changeset 1002
- Timestamp:
- 01/03/08 22:15:54
- Files:
-
- Shapely/trunk/shapely/geometry/linestring.py (modified) (2 diffs)
- Shapely/trunk/shapely/geometry/multilinestring.py (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
Shapely/trunk/shapely/geometry/linestring.py
r942 r1002 177 177 178 178 context = None 179 __geom = None 180 _owned = False 179 181 180 182 def __init__(self, context): 181 183 self.context = context 182 183 # Override base class __del__184 def __del__(self):185 pass186 184 187 185 @property … … 200 198 def _geom(self): 201 199 """Keeps the GEOS geometry in synch with the context.""" 202 return geos_linestring_from_py(self.context)[0] 200 if self.__geom is not None: 201 lgeos.GEOSGeom_destroy(self.__geom) 202 self.__geom = geos_linestring_from_py(self.context)[0] 203 return self.__geom 203 204 204 205 @property Shapely/trunk/shapely/geometry/multilinestring.py
r884 r1002 114 114 115 115 context = None 116 __geom = None 117 _owned = False 116 118 117 119 def __init__(self, context): 118 120 self.context = context 119 120 # Override base class __del__121 def __del__(self):122 pass123 121 124 122 @property … … 137 135 def _geom(self): 138 136 """Keeps the GEOS geometry in synch with the context.""" 139 return geos_multilinestring_from_py(self.context)[0] 137 if self.__geom is not None: 138 lgeos.GEOSGeom_destroy(self.__geom) 139 self.__geom = geos_multilinestring_from_py(self.context)[0] 140 return self.__geom 140 141 141 142
