Force a memory cleanup
(&self)
| 356 | |
| 357 | /// Force a memory cleanup |
| 358 | pub fn force_cleanup(&self) { |
| 359 | // Bypass rate limiting for forced cleanup |
| 360 | self.cleanup_events.fetch_add(1, Ordering::Relaxed); |
| 361 | |
| 362 | // Update stats |
| 363 | { |
| 364 | let mut stats = self.stats.lock(); |
| 365 | stats.last_cleanup = Some(Instant::now()); |
| 366 | } |
| 367 | |
| 368 | // Execute callbacks directly |
| 369 | self.execute_cleanup_callbacks(false); |
| 370 | } |
| 371 | |
| 372 | /// Enable or disable monitoring |
| 373 | pub fn set_monitoring_active(&self, active: bool) { |