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.
Rework API and improve memory handling of graph objects
Instead of QgsGraphBuilder::graph() taking the ownership of the graph and leaving the QgsGraphBuilder in an unpredictable state, add an explicit "takeGraph" method which takes the existing graph and make the existing "graph" method just return a copy of the graph. Also fix corresponding memory leaks in network analysis processing algorithms. Fixes #44079
- Loading branch information
Showing with 68 additions and 35 deletions.
- +14 −2 python/analysis/auto_generated/network/qgsgraphbuilder.sip.in
- +13 −8 src/analysis/network/qgsgraphbuilder.cpp
- +15 −3 src/analysis/network/qgsgraphbuilder.h
- +5 −3 src/analysis/processing/qgsalgorithmserviceareafromlayer.cpp
- +4 −2 src/analysis/processing/qgsalgorithmserviceareafrompoint.cpp
- +3 −3 src/analysis/processing/qgsalgorithmshortestpathlayertopoint.cpp
- +3 −3 src/analysis/processing/qgsalgorithmshortestpathpointtolayer.cpp
- +2 −2 src/analysis/processing/qgsalgorithmshortestpathpointtopoint.cpp
- +9 −9 tests/src/analysis/testqgsnetworkanalysis.cpp