Please sign in to comment.
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add temporary layer store to processing context
This temporary layer store (a QgsProject) is used as a store for layers that are added if a parameter that is evaluated to a layer requires that a new, non-active-project layer is loaded. It means that these layers will remain accessible for the duration of the algorithm's execution (or models execution if an algorithm is run as part of a model), before being automatically discarded when the QgsProcessingContext used to run the algorithm/model goes out of scope. This approach has several benefits: - it means that algorithms (including c++ algorithms) are able to use both project and non-project layers without needing to handle any memory management themselves. - it means that layers are guaranteed to last for the duration of a model execution. This is currently an issue where models which use memory layers as intermediate outputs do not function correctly as the memory layers are destroyed before the model has finished executing - there should be no leakage of layers remaining open after an algorithm exits
- Loading branch information
Showing with 25 additions and 0 deletions.