summaryrefslogtreecommitdiff
path: root/runtime/class_table-inl.h
diff options
context:
space:
mode:
Diffstat (limited to 'runtime/class_table-inl.h')
-rw-r--r--runtime/class_table-inl.h7
1 files changed, 7 insertions, 0 deletions
diff --git a/runtime/class_table-inl.h b/runtime/class_table-inl.h
index b15d82f5e4..1280466a91 100644
--- a/runtime/class_table-inl.h
+++ b/runtime/class_table-inl.h
@@ -132,6 +132,13 @@ inline ClassTable::TableSlot::TableSlot(ObjPtr<mirror::Class> klass, uint32_t de
}
}
+template <typename Filter>
+inline void ClassTable::RemoveStrongRoots(const Filter& filter) {
+ WriterMutexLock mu(Thread::Current(), lock_);
+ strong_roots_.erase(std::remove_if(strong_roots_.begin(), strong_roots_.end(), filter),
+ strong_roots_.end());
+}
+
} // namespace art
#endif // ART_RUNTIME_CLASS_TABLE_INL_H_