1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-26 06:47:34 +00:00

Kernel: Make File::unref virtual

This is required for SlavePTY's custom unref handler to function
correctly, as otherwise a SlavePTY held in a File RefPtr would call
the base's (RefCounted<>) unref method instead of SlavePTY's version.
This commit is contained in:
Idan Horowitz 2021-12-29 14:13:12 +02:00
parent 6dee1e91be
commit 9d034785de
2 changed files with 2 additions and 1 deletions

View file

@ -74,6 +74,7 @@ class File
: public RefCounted<File>
, public Weakable<File> {
public:
virtual bool unref() const { return RefCounted<File>::unref(); }
virtual void will_be_destroyed() { }
virtual ~File();