Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Garbage Collection Cycle Count Increases on Player Disconnect #6484

Open
kostamax27 opened this issue Nov 5, 2024 · 2 comments
Open

Garbage Collection Cycle Count Increases on Player Disconnect #6484

kostamax27 opened this issue Nov 5, 2024 · 2 comments
Assignees
Labels
Category: Core Related to internal functionality Status: Debugged Cause of the bug has been found, but not fixed

Comments

@kostamax27
Copy link

Issue description

  • Expected result: Running /gc in the console should show Cycles: 0 after a player disconnects.
  • Actual result: Running /gc shows Cycles: 38 after a player disconnects.

This issue is caused by this code:

$this->validators->add(new CallbackSlotValidator($this->validate(...)));

Steps to reproduce the issue

  1. Join the game.
  2. Quit the game.
  3. Use /gc in the console to check the garbage collection cycle count.

OS and versions

Plugins

Plugins (0):

  • If you remove all plugins, does the issue still occur? Yes
@dktapps
Copy link
Member

dktapps commented Nov 6, 2024

Yeah, we had problems like this before with DelegateInventory. It needs to use a weakref to reference $this.

@dktapps dktapps added Category: Core Related to internal functionality Status: Debugged Cause of the bug has been found, but not fixed labels Nov 6, 2024
@ShockedPlot7560
Copy link
Member

Right, the slot validator is a new feature, thanks !

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Category: Core Related to internal functionality Status: Debugged Cause of the bug has been found, but not fixed
Projects
None yet
Development

No branches or pull requests

3 participants