mirror of
https://github.com/fergalmoran/ladybird.git
synced 2026-01-08 17:47:18 +00:00
Kernel: Break retain cycle between Inode and VMObject.
There's no need for an Inode to keep its corresponding VMObject alive. Obviously there are huge benefits to keeping a filesystem cache, but leaking everything is hardly the right strategy. :^)
This commit is contained in:
@@ -148,7 +148,7 @@ void FS::sync()
|
||||
}
|
||||
}
|
||||
|
||||
void Inode::set_vmo(RetainPtr<VMObject>&& vmo)
|
||||
void Inode::set_vmo(VMObject& vmo)
|
||||
{
|
||||
m_vmo = move(vmo);
|
||||
m_vmo = vmo.make_weak_ptr();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user