[3.11] GH-99729: Unlink frames before clearing them (#100047)

4 files changed