about summary refs log tree commit diff
path: root/tests/rustdoc/source-code-pages/check-source-code-urls-to-def.rs
diff options
context:
space:
mode:
authorMatthias Krüger <476013+matthiaskrgr@users.noreply.github.com>2025-09-25 18:15:09 +0200
committerGitHub <noreply@github.com>2025-09-25 18:15:09 +0200
commit83cf8f98600a18c690ce890bd7c0f25c14351815 (patch)
treed1c202bc42a417bed16170d330852bfc9e2cf570 /tests/rustdoc/source-code-pages/check-source-code-urls-to-def.rs
parentfea9196e5271a61dc526246a6ccdc2db0f998603 (diff)
parent137d4eaf12139af894da6c0b6fe74195d6b7b98c (diff)
downloadrust-83cf8f98600a18c690ce890bd7c0f25c14351815.tar.gz
rust-83cf8f98600a18c690ce890bd7c0f25c14351815.zip
Rollup merge of #146859 - cammeresi:btree-alloc-20250920, r=joboet
BTreeMap: Don't leak allocators when initializing nodes

Memory was allocated via `Box::leak` and thence intended to be tracked and deallocated manually, but the allocator was also leaked, not tracked, and never dropped.  Now it is dropped immediately.

According to my reading of the `Allocator` trait, if a copy of the allocator remains live, then its allocations must remain live.  Since the B-tree has a copy of the allocator that will only be dropped after the nodes, it's safe to not store the allocator in each node (which would be a much more intrusive change).

Fixes: rust-lang/rust#106203
Diffstat (limited to 'tests/rustdoc/source-code-pages/check-source-code-urls-to-def.rs')
0 files changed, 0 insertions, 0 deletions