How to remove a componentNode completely?

When I create a componentNode with figma.createComponent and then remove it by calling remove method on the node, I can see the node disappear on the node list panel but I can still access it by figma.getNodeById. I assume figma still store the component info somewhere and could that lead to possible memory leak? Is there a way that I can delete the node complete ?

It should be deleted completely if there are no depending instances after you reload the page.

Indeed. Thanks so much