Skip to content

Fix lot of wire entities not calling WireLib.Remove on remove - #3753

Merged
Astralcircle merged 4 commits into
wiremod:masterfrom
Astralcircle:onremove
Nov 5, 2026
Merged

Astralcircle merged 4 commits into
wiremod:masterfrom
Astralcircle:onremove

Conversation

@Astralcircle

Copy link
Copy Markdown
Member

Because of this, a lot of stuff might not have been cleaned up, leading to memory leaks

@Astralcircle
Astralcircle merged commit 843ce8d into wiremod:master Nov 5, 2026
1 check failed
@Astralcircle
Astralcircle deleted the onremove branch November 5, 2026 15:40
Comment on lines -459 to -462
function ENT:OnRemove()
WireLib.Remove(self)
end

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This right to remove the WireLib.Remove(self) here after changeing all the code to call BaseClass.OnRemove(self) in other entities?

It looks like WireLib.Remove(self) is still not called.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I made it call for everything in EntityRemoved, and calling BaseClass.OnRemove(self) is still good practice so no reason not to do it

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oh actually it's not called for client now..., gonna fix that

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants