0

# pcall in RenderStepped causes memory leak/increase?

TechModel 118
13 days ago
Edited 13 days ago

Sounds dumb of me but after running this loop, the memory does increase gives me concerns. I'm trying to ensure this code does not output errors or to retry the code every render. Should I pcall without local s, e or not at all?

RService.RenderStepped:Connect(function()
local s, e = pcall(function()
-- something
end)
if not s then
print(e)
end
end)