mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-09-24 18:28:57 +00:00
Kernel: Customize File::unref() and make it virtual
Make File inherit from RefCountedBase and provide a custom unref() implementation. This will allow subclasses that participate in lists to remove themselves in a safe way when being destroyed.
This commit is contained in:
parent
fc0cd8317a
commit
641083f3b8
Notes:
sideshowbarker
2024-07-18 05:35:57 +09:00
Author: https://github.com/awesomekling
Commit: 641083f3b8
2 changed files with 10 additions and 1 deletions
|
@ -71,9 +71,10 @@ public:
|
|||
// - Should create a Region in the Process and return it if successful.
|
||||
|
||||
class File
|
||||
: public RefCounted<File>
|
||||
: public RefCountedBase
|
||||
, public Weakable<File> {
|
||||
public:
|
||||
virtual bool unref() const;
|
||||
virtual ~File();
|
||||
|
||||
virtual KResultOr<NonnullRefPtr<FileDescription>> open(int options);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue