howmanysmall
All work

Open-source library / Luau

Janitor

Cleanup code should make ownership obvious before it makes anything clever.

Based on Validark's original implementation.

Role
Primary contributor and maintainer
Language
Luau
Focus
Luau · Roblox · lifecycle
One owner gathers cleanup work; one cleanup boundary releases it predictably.

The problem

Long-running game systems collect connections, instances, promises, callbacks, and other resources with different cleanup APIs. When ownership is implicit, teardown becomes a scavenger hunt and leaks hide in the gaps.

Janitor gives those resources a common owner and a predictable cleanup boundary.

Stewardship

The library is based on Validark’s original implementation. My role has been maintaining and evolving it: refining the API, documenting behavior, publishing releases, and keeping a focused utility dependable for the Roblox developers who use it.

Its strongest design choice is restraint. Janitor does not try to become an application lifecycle framework; it gives heterogeneous resources one cleanup vocabulary and then gets out of the way.

What it demonstrates

  • Long-term stewardship of a public API.
  • Clear attribution and continuity across maintainers.
  • Documentation and release discipline in a community library.
  • Solving lifecycle problems without expanding the abstraction past its job.