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

Mono does not release any objects of the type event. #53156

Closed
kalysti opened this issue Sep 28, 2021 · 6 comments
Closed

Mono does not release any objects of the type event. #53156

kalysti opened this issue Sep 28, 2021 · 6 comments

Comments

@kalysti
Copy link
Contributor

kalysti commented Sep 28, 2021

Godot version

4.0.dev

System information

Windows 10, Windows 11

Issue description

Each input event increse the holded objects inside the engine. The events will be holded permanent and not destroyed .
When i try to free the Event with .free(), it reduce the hold objects by the engine (however, not all will be destroyed).

Same issue with _UnhandledInput and _UnhandledKeyInput

Steps to reproduce

public override void _Input(InputEvent @event) { }

Just moving the mouse and u will get this
image

Minimal reproduction project

No response

@kalysti
Copy link
Contributor Author

kalysti commented Sep 28, 2021

Btw under GDScripts its working.

@kalysti
Copy link
Contributor Author

kalysti commented Sep 28, 2021

public override void _Input(InputEvent @event) { @event.Free(); }

Fun fact when i try to free manualy, just some objects (randomly) will be destroyed.

@akien-mga
Copy link
Member

Duplicate of #41543, Mono is garbage collected so the memory release will happen whenever it decides it's needed.

@kalysti
Copy link
Contributor Author

kalysti commented Sep 28, 2021

@akien-mga

Sorry but the issue is, it will not be relaesed (holded without to use the obeject until the rest of my life :-)). So its a issue. Ticket have to be still open.

@kalysti
Copy link
Contributor Author

kalysti commented Sep 28, 2021

Btw disposing and freeing are not working.

@kalysti
Copy link
Contributor Author

kalysti commented Sep 28, 2021

Okai. Was figured out. Two issues at the same time. First one (event disposing) can be fixed with .Disposed(). Second memory leak i will open a new ticket.

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

No branches or pull requests

3 participants