Uses a swap operation to completely clear `std::deque` state. The `std::deque` shows up in prod heap profiles, even though it's likely empty after the connection goes forward-secure. Protected by data structure type change, not possible to protect. PiperOrigin-RevId: 845929151
diff --git a/quiche/quic/core/quic_connection.cc b/quiche/quic/core/quic_connection.cc index 1ff58d4..a1148dc 100644 --- a/quiche/quic/core/quic_connection.cc +++ b/quiche/quic/core/quic_connection.cc
@@ -4615,7 +4615,7 @@ undecryptable_packet.encryption_level, /*dropped=*/true); } } - undecryptable_packets_.clear(); + std::deque<UndecryptablePacket>().swap(undecryptable_packets_); } if (perspective_ == Perspective::IS_CLIENT) { SetRetransmissionAlarm();