pub struct TrimOnDrop;Expand description
release_free_memory when dropped: bound at the top of a conversion’s
scope (let _trim = TrimOnDrop;), the trim runs however the scope ends —
return, early ?, panic unwinding — after the buffers declared in it are
gone. The bindings put one at every entry point that converts (#871:
Node’s Pipeline.convertAsync path had no trim, and RSS between
documents climbed 950 → 1,566 MiB over five PDFs).
Trait Implementations§
Source§impl Drop for TrimOnDrop
impl Drop for TrimOnDrop
Auto Trait Implementations§
impl Freeze for TrimOnDrop
impl RefUnwindSafe for TrimOnDrop
impl Send for TrimOnDrop
impl Sync for TrimOnDrop
impl Unpin for TrimOnDrop
impl UnsafeUnpin for TrimOnDrop
impl UnwindSafe for TrimOnDrop
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more