I ran this code in an empty baseplate:
while task.wait() do
workspace:WaitForChild("Part").Touched:Connect(function()
print("touched")
end)
end
When I checked LuauHeap, the number of RBXScriptConnections doesn’t increase but I’m certain that it’s taking up memory.
When I run this:
local x = {}
while task.wait() do
local connection = workspace:WaitForChild("Part").Touched:Connect(function()
print("touched")
end)
table.insert(x,connection)
end
The number of RBXScriptConnections does increase over time. Does anyone know how I can detect memory increases from the first snippet of code?