Clear the pool, forgetting about all lists that use it. This invalidates any existing entity lists that used this pool to allocate memory. The pool's memory is not released to the operating system, but kept around for faster allocation in the future.
(&mut self)
| 169 | /// The pool's memory is not released to the operating system, but kept around for faster |
| 170 | /// allocation in the future. |
| 171 | pub fn clear(&mut self) { |
| 172 | self.data.clear(); |
| 173 | self.free.clear(); |
| 174 | } |
| 175 | |
| 176 | /// Read the length of a list field, if it exists. |
| 177 | fn len_of(&self, list: &EntityList<T>) -> Option<usize> { |