Commit 6f06cf0
src: delete BaseObjectWeakPtr data when pointee is gone
Fix the condition for deleting the underlying data pointed to by
a `BaseObjectWeakPtr`, which erroneously skipped that deletion
when `ptr->get()` was `nullptr`. This fixes a memory leak reported
by some of the tests.
Refs: #30374 (comment)
PR-URL: #32393
Reviewed-By: Matheus Marchini <mat@mmarchini.me>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>1 parent 2bcf535 commit 6f06cf0Copy full SHA for 6f06cf0
File tree
Expand file treeCollapse file tree
1 file changed
+3
-3
lines changedOpen diff view settings
Filter options
- src
Expand file treeCollapse file tree
1 file changed
+3
-3
lines changedOpen diff view settings
Collapse file
+3-3Lines changed: 3 additions & 3 deletions
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| ||
234 | 234 | |
235 | 235 | |
236 | 236 | |
237 | | - |
238 | 237 | |
239 | | - |
| 238 | + |
| 239 | + |
240 | 240 | |
241 | 241 | |
242 | 242 | |
243 | | - |
| 243 | + |
244 | 244 | |
245 | 245 | |
246 | 246 | |
|
0 commit comments