Function shredder::run_with_gc_cleanup [−][src]
pub fn run_with_gc_cleanup<T, F: FnOnce() -> T>(f: F) -> T
Expand description
A convenience method for helping ensure your destructors are run.
In Rust you can never assume that destructors run, but using this method helps shredder
not
contribute to that problem.
Example
use shredder::{run_with_gc_cleanup}; // Generally you'd put this in `main` run_with_gc_cleanup(|| { // Your code goes here! })