Skip to content

Instantly share code, notes, and snippets.

View TheGreatSageEqualToHeaven's full-sized avatar
🫖
Tea, Earl Grey, hot.

James TheGreatSageEqualToHeaven

🫖
Tea, Earl Grey, hot.
View GitHub Profile
@zeux
zeux / gctracker.lua
Last active September 5, 2024 20:24
GC tracker for Luau that provides more predicatable (compared to `__gc`...) destructor invocation for dead objects. Supports ~constant time update cost by limiting the iteration count such that update can be called every frame with a small n for negligible performance cost.
--!strict
--[[
BSD Zero Clause License
Copyright (c) 2022 Arseny Kapoulkine
Permission to use, copy, modify, and/or distribute this software for any
purpose with or without fee is hereby granted.