void removeFromParent()

Removes this display object from its parent.

Source

void removeFromParent() {
  if (this.parent != null) {
    this.parent.removeChild(this);
  }
}