Merge "Close TaskSnapshot hardware buffer before remove from cache." into main