From 5a7e106856a3151ace6c79d9d002a6b06c7f3836 Mon Sep 17 00:00:00 2001 From: Nikolai Tillmann Date: Tue, 5 Dec 2023 11:29:08 -0800 Subject: [PATCH] Release annotations of removed classes Reviewed By: ssj933 Differential Revision: D51837578 fbshipit-source-id: 3e751e5d604f561d4e38e10d072637b108c773eb --- libredex/Reachability.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/libredex/Reachability.cpp b/libredex/Reachability.cpp index de028207423..9da0dd139cb 100644 --- a/libredex/Reachability.cpp +++ b/libredex/Reachability.cpp @@ -2146,6 +2146,10 @@ void sweep(DexStoresVector& stores, } cls->get_dmethods().clear(); cls->get_vmethods().clear(); + auto anno_set = cls->get_anno_set(); + if (anno_set) { + anno_set->get_annotations().clear(); + } return; } sweep_if_unmarked(reachables, DexField::delete_field_DO_NOT_USE,