Skip to main content
2 of 2
deleted 20 characters in body
Bálint
  • 15.1k
  • 2
  • 38
  • 57

If simply not drawing it when its health is 0 isn't enough, you can just set the variable to null. This won't affect the memory immediately, but since JavaScript is garbage collected, unless you have multiple global references to it, it will eventually get deleted when space is needed

Bálint
  • 15.1k
  • 2
  • 38
  • 57