Prevents memory leak from retransmitted messages' getting stored.