Update Graph after GameObject destruction


My question is, as the title states, how can I update the graph with the old bounds of the GameObject after the object has been destroyed (making it free for movement)

My code atm:

// Temporarily saving the collider bounds for A*
var temp: Bounds = collider.bounds;

// Destroy the actual GameObject

// Making sure A* removes it from the pathfinding:
print("Removing from A*, Bounds=" + temp + ", GameObject=" + this.gameObject);

Thanks in advance,

After asking the author of A*, he pointed me to an overload of the UpdateGraph function that accepted an delay:

AstarPath.active.UpdateGraphs(temp, 1); // Second parameter is the delay

This fixed the problem.