File tree Expand file tree Collapse file tree 1 file changed +7
-2
lines changed Expand file tree Collapse file tree 1 file changed +7
-2
lines changed Original file line number Diff line number Diff line change @@ -70,7 +70,12 @@ function reproject(geom, transform::Proj.Transformation;
70
70
functors = TaskFunctors (WithXY .(proj_transforms))
71
71
apply (functors, GI. PointTrait (), geom; kw1... )
72
72
end
73
- # Destroy the temporary threading contexts that we created
73
+ # First, destroy the temporary transforms we created,
74
+ # so that the contexts are not destroyed while the transforms still exist
75
+ # if the GC was slow.
76
+ foreach (finalize, proj_transforms)
77
+ # Destroy the temporary threading contexts that we created,
78
+ # now that it is safe to do so.
74
79
foreach (Proj. proj_context_destroy, contexts)
75
80
# Return the results
76
81
return results
@@ -81,4 +86,4 @@ function reproject(geom, transform::Proj.Transformation;
81
86
return apply (WithXY (transform), GI. PointTrait (), geom; kw1... )
82
87
end
83
88
end
84
- end
89
+ end
You can’t perform that action at this time.
0 commit comments