[HELP ] It says "Global collectgarbage is deprecated, use 'gcinfo' instead", but there's no documentation for gcinfo. Can someone help?

So I have a data thing that is suppose to collect garbage as it says, but the script analysis says “collectgarbage” is deprecated, however “gcinfo” as its replacement has absolutely no documentation. How would I continue about? Do I literally just replace “collectgarbage’s” name to “gcinfo” or what?

Please help me someone, it would be appreciated

This is the script line below

local startTime, startMemory = tick(), collectgarbage(‘count’)
do
local d = {}
for _, m in pairs(data) do
if debug then print(‘loading data module "’…m.Name…‘"’) end
d[m.Name] = require(m)
end
data = d
if debug then print(‘data modules loaded’) end
end

1 Like

Yes, just replace it? The only difference is gcinfo() is a bit less precise.

3 Likes

Was that a question or answer? I didn’t understand

1 Like

Just replace it.

2 Likes