You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
//if header has been built, add the feature, and the attributes.
94
94
95
95
feature:=layerDef.Create()
96
-
//defer feature.Destroy()
96
+
deferfeature.Destroy()// Destroy feature. I believe this also destroys the geometry object g, defined below. If feature is not destroyed, memory is not released
97
97
feature.SetFieldInteger(0, srw.index)
98
98
//create a point geometry - not sure the best way to do that.
99
99
x:=0.0
100
100
y:=0.0
101
101
g:=gdal.Create(gdal.GeometryType(gdal.GT_Point))
102
-
deferg.Destroy()
102
+
// defer g.Destroy() // Don't Destroy g (I believe this is handled in feature.Destroy())
0 commit comments