Bug report #15137
Vector file remains locked after delete QgsVectorLayer object
Status: | Closed | ||
---|---|---|---|
Priority: | Severe/Regression | ||
Assignee: | |||
Category: | Data Provider/OGR | ||
Affected QGIS version: | 2.14.3 | Regression?: | No |
Operating System: | Windows | Easy fix?: | No |
Pull Request or Patch supplied: | No | Resolution: | fixed/implemented |
Crashes QGIS or corrupts data: | No | Copied to github as #: | 23076 |
Description
I use lot of temp files for loading data.
sample code:
shutil.copy(source_gml, gml_path+'/temp/file.gml')
gml_layer = QgsVectorLayer(gml_path+'/temp/file.gml', "gml_layer", "ogr")
gml_iter = gml_layer .getFeatures()
for gml_feature in gml_iter :
(...)some work here(...)
*del gml_layer*
shutil.rmtree(gml_path+"/temp")
Problem is with gml, shp files, I didn't try other.
Code is working fine in 2.8.2, so it is regression.
Associated revisions
[OGR provider] Make sure to release dangling connections on provider closing
Fixes #15137
[Spatialite provider] Make sure to release dangling connections on provider closing
Fixes #15137
[OGR provider] Make sure to release dangling connections on provider closing
Fixes #15137
[Spatialite provider] Make sure to release dangling connections on provider closing
Fixes #15137
History
#1
Updated by Even Rouault about 8 years ago
- Assignee set to Even Rouault
#2
Updated by Even Rouault about 8 years ago
- Status changed from Open to Closed
Fixed in changeset 4ad50a708bc21f7f8e4495de5a997a93712c81c5.
#3
Updated by Even Rouault about 8 years ago
- Resolution set to fixed/implemented
- % Done changed from 0 to 100
- Category changed from Python plugins to Data Provider/OGR
This also affected Spatialite. Fixed in both cases