Skip to content

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

Description

@siranweb

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:
import { Node2D, SceneNodes } from 'godot';

export default class Temp extends Node2D<SceneNodes['src/temp.tscn']> {
  public override _input(event: InputEvent) {}
}
  1. Run this scene and move mouse.
  2. 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:

import { Node2D, SceneNodes } from 'godot';

export default class Temp extends Node2D<SceneNodes['src/temp.tscn']> {
  // public override _input(event: InputEvent) {}
}
Image

Activity

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions