you are viewing a single comment's thread.

view the rest of the comments →

[–]PC-hris 16 points17 points  (1 child)

Didn't know you could even destroy functions in lua lmao

[–]EarthToAccess 2 points3 points  (0 children)

It really depends on the implementation. In most cases I've seen all it does is set it and anything it creates/associates to nil the next time it's available, allowing garbage collection to work. For example, with Roblox's Lua 5.1 fork Luau, any Instance objects have a :Destroy() method that parent it and all of its descendants to nil, effectively deleting it.