LibJS: Do not clear VM's string cache in Heap's destructor

There is definitely a possibility I am misunderstanding the reason
behind it - but this does not appear neccessary. The VM owns both the
string cache and Heap. On destruction, the VM should clear out both
the heap and its string cache.
This commit is contained in:
Shannon Booth 2024-08-18 21:59:32 +12:00 committed by Andreas Kling
parent cf27eef583
commit d199bf60cf
Notes: github-actions[bot] 2024-11-13 10:09:36 +00:00

View file

@ -43,8 +43,6 @@ Heap::Heap(VM& vm)
Heap::~Heap()
{
vm().string_cache().clear();
vm().byte_string_cache().clear();
collect_garbage(CollectionType::CollectEverything);
}