(&mut self)
| 145 | |
| 146 | impl Drop for Memory { |
| 147 | fn drop(&mut self) { |
| 148 | // leak memory to guarantee validity of function pointers |
| 149 | mem::replace(&mut self.allocations, Vec::new()) |
| 150 | .into_iter() |
| 151 | .for_each(mem::forget); |
| 152 | } |
| 153 | } |
| 154 | |
| 155 | /// A memory provider that allocates memory on-demand using the system |