WeakReferenceable: Clear fUseCount when it is 1.
Otherwise, if there are remaining weak references, they could potentially try to acquire the object and trigger a use-after-free.
This commit is contained in:
@@ -30,6 +30,8 @@ public:
|
||||
void GetUnchecked();
|
||||
|
||||
private:
|
||||
friend class BWeakReferenceable;
|
||||
|
||||
int32 fUseCount;
|
||||
BWeakReferenceable* fObject;
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user