godotjs / godotjs/GodotJS

[Bug] Too many objects appears in monitoring due to _input()

Open
#216 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
C
Stars
765
Forks
46
PR merge metrics
No merged PRs in 30d

Description

## Environment
- Godot v4.5.1.stable.gh.f62fdbde1
- Windows 10
- V8

## Issue
If scene's script has `_input()` method (even empty), lot's of objects are created in memory when you're just moving your mouse.

## Reproduce steps

1. Create a new Node2D scene.
2. Attach script to created scene:
```ts
import { Node2D, SceneNodes } from 'godot';

export default class Temp extends Node2D {
public override _input(event: InputEvent) {}
}
```
3. Run this scene and move mouse.
4. Open Debugger -> Monitors and look. Yellow - godot's metrics, purple - godotJs metrics.

Image

## Additional info
In case, if `_input()` is removed/commented, additional objects are not creating:

```ts
import { Node2D, SceneNodes } from 'godot';

export default class Temp extends Node2D {
// public override _input(event: InputEvent) {}
}
```

Image

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.