Capítulo 206 de 411

Chapter 206: Draggable.kill()

Core Idea

Disables the Draggable and removes it from the internal lookup table (so Draggable.get() can no longer find it), making it eligible for garbage collection.

Key Takeaways

  1. Differs from disable(): a disabled-but-not-killed instance is still findable via Draggable.get(id); a killed one is not. Use kill() when you're done with the instance for good.

Connects To

  • Draggable.disable(): stops dragging without removing it from the lookup table.
  • Draggable.get(): the static lookup that a killed instance is removed from.