Question about node leaks

esdoSMCesdoSMC Posts: 11Member

Hello!

Im just wondering if creating a var timer = Timer.new() inside a function call ( so that it would be a local variable ) causes a leak? Since i have no way to queue_free() the timer later.

Thanks!

Answers

  • TwistedTwiglegTwistedTwigleg Posts: 1,049Admin
    Answer ✓

    According to this QA answer, it looks like you need to use the free function to prevent memory leaks on nodes that are not added to a scene.

    Hopefully this helps :smile:

  • esdoSMCesdoSMC Posts: 11Member
    edited January 21

    Thanks. Sorry for the silly question.

  • TwistedTwiglegTwistedTwigleg Posts: 1,049Admin

    @esdoSMC said:
    Thanks. Sorry for the silly question.

    No problem, and there is no reason to apologize. There are no silly questions :smile:

Sign In or Register to comment.