mirror of
https://gitee.com/openharmony/resourceschedule_ffrt
synced 2024-11-26 23:00:25 +00:00
update src/util/slab.h.
Signed-off-by: 董洁 <dongjie52@h-partners.com>
This commit is contained in:
parent
2dc0c73cc5
commit
d47a4c0ca7
@ -60,6 +60,7 @@ public:
|
||||
// NOTE: call destructor before FreeMem
|
||||
static void FreeMem(T* t)
|
||||
{
|
||||
t->~T();
|
||||
// unlock()内部lck记录锁的状态为非持有状态,析构时访问状态变量为非持有状态,则不访问实际持有的mutex
|
||||
// return之前的lck析构不产生UAF问题,因为return之前随着root析构,锁的内存被释放
|
||||
Instance()->free(t);
|
||||
|
Loading…
Reference in New Issue
Block a user