one of the safety requirements for the Allocator trait is:
|
/// * Memory blocks returned from an allocator must point to valid memory and retain their validity |
|
/// until the instance and all of its clones are dropped, |
|
/// |
afaict that's incorrect since, because of the validity requirements, it requires Allocators to never free any memory blocks until the Allocator and all clones are dropped.
It should instead be something like:
/// * Memory blocks returned from an allocator that are [*currently allocated*] must point to
/// valid memory and retain their validity while they are [*currently allocated*] and at
/// least one of the instance and all of its clones has not been dropped.
one of the safety requirements for the
Allocatortrait is:rust/library/core/src/alloc/mod.rs
Lines 97 to 99 in a28f3c8
afaict that's incorrect since, because of the validity requirements, it requires Allocators to never free any memory blocks until the Allocator and all clones are dropped.
It should instead be something like: