After parts are destroyed by:
workspace.FallenPartsDestroyHeight they do not have connected signals disconnected. (I suspect it
Remove's them and does not
Destroy as it should.) This causes a memory leak in a few games I develop for and I suspect multiple other games as this shouldn’t be intended behavior. I believe this also does not disconnect signals to the descendants of the instance as well.
If this is patched this will make it so I do not have to implement a weird hacky detection to disconnect all signals to instances if they get removed from falling out of the world.
BaseParts reach the
FallenPartsDestroyHeight they should be properly
Destroy'ed and disconnect all connected signals to the instance, as well as, its descendants.
(The example game is open-source, you may open it in Roblox Studio.)
ChildRemoved, or etc signal to a
BasePart. Have the
BasePart reach the
FallenPartsDestroyHeight and be removed. Notice the signal not getting automatically disconnected.
Both of these games I develop for have tools you can drop, the tools have Touched signals to detect someone picking them up, if they happen to somehow fall out of the map, they remain in memory forever with a memory leak.
Script Memory Leak:
Signal Memory Leak: