1
0
mirror of https://github.com/metrostroi-repo/MetrostroiAddon.git synced 2026-05-02 00:42:29 +00:00

Merge pull request #611 from metrostroi-repo/#608

Фикс утечки памяти
This commit is contained in:
Sherbanov Kosmik
2025-11-05 21:44:40 +03:00
committed by GitHub

View File

@@ -303,6 +303,11 @@ function ENT:GetWagonNumber()
end
-- Remove entity
function ENT:OnRemove()
-- Remove FailSim objects
for k,v in pairs(self.Systems) do
if FailSim.Objects[v] then FailSim.Objects[v] = nil end
end
-- Remove all linked objects
constraint.RemoveAll(self)
if self.TrainEntities then