-
-
Notifications
You must be signed in to change notification settings - Fork 3.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Lots of memory leak fixes #60629
Lots of memory leak fixes #60629
Conversation
From the sip documentation: If state is not NULL then the location it points to is set to describe the state of the returned C/C++ instance and is the value returned by any %ConvertToTypeCode. The calling code must then release the value at some point to prevent a memory leak by calling sipReleaseType(). These methods were only calling sipReleaseType in the case that an error occurred, which is incorrect -- it should always be called.
getLayer can alter the container we are iterating over, which means that key is deleted while we are still using it. Make a copy instead to avoid.
QgsWkbPtr does NOT take ownership of the data, port to QByteArray instead
🪟 Windows buildsDownload Windows builds of this PR for testing. 🪟 Windows Qt6 buildsDownload Windows Qt6 builds of this PR for testing. |
The backport to
stderr
stdout
To backport manually, run these commands in your terminal: # Fetch latest updates from GitHub
git fetch
# Create a new working tree
git worktree add .worktrees/backport-release-3_40 release-3_40
# Navigate to the new working tree
cd .worktrees/backport-release-3_40
# Create a new branch
git switch --create backport-60629-to-release-3_40
# Cherry-pick the merged commit of this pull request and resolve the conflicts
git cherry-pick dbad2f8da191e6b554bdf43dd6a87230d73d9662,a152cbecdb1d0d5a6a5044b9302d228c175003f0,6a7b8fde00bfa17fbecfb7e90e4503d25b47e6f7,baf2e5f7423def3fa7e8e657ed798cab19293903,5c0b7d8b78f769ea736ae79eed777643efc6fcdd,aa04760f806b4d3af68067fb33b5b3ac9d96ad4f,91c796eb0521ea0fe92b0b63dd16979860c86f2b,76c767fe1529d7454ffe90e9eb5213803ec0fa54,3a893ace979c721eca2f114386a64cca753e1105
# Push it to GitHub
git push --set-upstream origin backport-60629-to-release-3_40
# Go back to the original working tree
cd ../..
# Delete the working tree
git worktree remove .worktrees/backport-release-3_40 Then, create a pull request where the |
I was trying to work out why the shapefile provider test randomly fails, but found a bunch of leaks instead... 🤷