Manages the cleaning of events and other things.
Useful for encapsulating state and make deconstructors easy
|Maid||Maid.new ( )||Returns a new Maid object|
|__index ( index )||Returns Maid[key] if not part of Maid metatable|
|__newindex ( index newTask )||Add a task to clean up|
|number||GiveTask ( task )||Same as indexing, but uses an incremented number as a key.|
|DoCleaning ( )||Cleans up all tasks.|
|Destroy ( )||Alias for DoCleaning()|
Returns Maid[key] if not part of Maid metatable
Add a task to clean up
Maid[key] = (function) Adds a task to perform Maid[key] = (event connection) Manages an event connection Maid[key] = (Maid) Maids can act as an event connection, allowing a Maid to have other maids to clean up. Maid[key] = (Object) Maids can cleanup objects with a `Destroy` method Maid[key] = nil Removes a named task. If the task is an event, it is disconnected. If it is an object, it is destroyed.
Same as indexing, but uses an incremented number as a key.
Cleans up all tasks.
Alias for DoCleaning()