This is great, I’m new so I never used this till now.
One thing I would love to see fixed about this to improve it…
add the ability to scroll where you pick “LuauHeap”
I had to close my output and drag the Dev Console all the way to the top of the screen to see it. It would be nice to be able to hover the mouse over the box and use the wheel to change the selection, or have a scroll bar.
I compared two versions of my game, one where players claim an area themselves, and one where the area is given automatically.
I could actually tell which one was better, it brought the client memory usage down by 300MB and there was 20,000 difference in the registry value. The one where area was given automatically was better.
I’m having this same issue in my game Empire Clash - the server just wont work. Creating a snapshot will cause the server to hang for a few seconds. However, no snapshot will generate after the hanging stops.
I’m not super technically-informed with LuaU so I’m not entirely sure on what these references mean and/or how I would fix something like this, but it’s something!
For added context, a few GUIs in my game have modules located in them for organization purposes, which are causing this issue and resulting in a memory leak for the game. Hoping to get it all sorted out soon!
Unfortunately, engine often cannot clear the result table of a module, even if if the ModuleScript is destroyed.
We checked and there were multiple games that relied on calling require on a destroyed ModuleScript.
the one thing i’m observing is apparently explosions w/ explosion.Hit connections are never cleaned up after the explosion has finished? I was trying to trace an ever expanding memory footprint on some relatively straightforward scripts and believe I narrowed it to a simple explosion instantiation w/ explosion.Hit:Connect(…
What’s the proper way to fully clean up an explosion.Hit connection after it has run it’s course? I’m surprised to learn this doesn’t appear to be done automatically.
Edit: I tried just slapping a task.delay(3,function() explosion:Destroy() end)
in after the explosion was parented to the workspace and it stopped the runaway memory allocation… Wild as this isn’t mentioned anywhere in roblox docs nor do any of the guides on adding explosions mention the need to manually cleanup. My game uses a lot of em too :o
I modified this module to make sure that the tables that contain the parts gets set to nil once it is destroyed, this also happens on other things like the player instance and the character instance even tho no table is holding a reference to them and i understand there are other things like connections and such but even connections should be automatically destroyed if the object has been destroyed, this is importantly concerning, is it possible that unique references doesn’t show all paths possible and only some or is there some explanation?
You can take the connection returned by Connect and use that object to disconnect in PlayerRemoving signal.
Alternatively, if this on the server, you can try auto-destroy of Player and Character using this property: New Player and Character Destroy Behavior
(if it doesn’t break something in the experience)
One other option is to not capture outer variables like ‘Player’ argument from inside the connection, but this is not always possible.
I’m a bit confused on the difference between self and stack, is anyone able to provide an example with a definition?
At the moment, I’m working on lowering my array count as I have, “popUpTextBuffer” at 10981 size and 128 self (I assume these are in bytes) which is a descendant of “array” which has a size of 1101126 and self value of 868112.