[BUG] I need to remove the widget twice in order to remove it.

Could you run a test:

  • remove the widget from parent once, do not Collect Garbage
  • keep ticking Get All Widgets
  • get a cookie, wait 70 seconds

What do you get?


Almost certainly irrelevant, but perhaps you could shed some light on this part:

Did you mean to set anchors of the canvas slot instead? As in:

This widget is not in the viewport anyway.


When I reproduce

What I meant was how do we reproduce it. Because, as you probably know, under regular circumstances, removing a widget from its parent works pretty consistently. What is irregular here, what’s special about this setup?


Also, most importantly:

the Widget doesn’t remove

Do you mean it does not get released from memory or it does not disappear from the screen? If it’s about memory release - automatic Garbage Collection is scheduled to happen much later, you just need to wait. It’s designed not to stress the system with frequent updates - calling it manually produces the opposite effect as @dZh0 mentioned.