dispose method

void dispose()

Disposes the particle and returns it to the object pool.

This method is called by the GSimpleParticleSystem to dispose of the particle and return it to the object pool. It removes the particle from the particle list and adds it to the available instance list.

Implementation

void dispose() {
  if ($next != null) {
    $next!.$prev = $prev;
  }
  if ($prev != null) {
    $prev!.$next = $next;
  }
  $next = null;
  $prev = null;
  $nextInstance = $availableInstance;
  $availableInstance = this;
}