/// Allocates a temporary cell which is only valid to use until the end of the given callback
Allocates a temporary cell which is only valid to use until the end of the given callback
Allocates a temporary cell which is only valid to use until the end of the given callback
pub fn temporary<F, T>(&mut self, size: MemSize, callback: F) -> T
        where F: FnOnce(Cells) -> T {
        let position = self.allocate(size);
        let cells = Cells {position, size};
        let res = callback(cells);
        self.remove_cells(cells);
        res
    }
pub fn temporary < F , T > ( & mut self , size : MemSize , callback : F ) -> T where F : FnOnce ( Cells ) -> T { let position = self . allocate ( size ) ; let cells = Cells { position , size } ; let res = callback ( cells ) ; self . remove_cells ( cells ) ; res }
Allocates a temporary cell which is only valid to use until the end of the given callback
Allocates a temporary cell which is only valid to use until the end of the given callback
&mut self
size
MemSize
callback
F