maple.utils.cleanup.register_cleanup_handler

maple.utils.cleanup.register_cleanup_handler(name: str, handler: Callable) None

Register a custom cleanup handler.

Convenience function that uses the global CleanupManager singleton.

Parameters:
  • name – Unique identifier for the cleanup handler.

  • handler – Callable that performs cleanup (takes no arguments).