MCPcopy Create free account
hub / github.com/SakuraEngine/SakuraEngine / add_refcount

Method add_refcount

modules/engine/runtime/src/misc/object.cpp:4–8  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

2#include "SkrOS/atomic.h"
3namespace skr {
4uint32_t SObjectHeader::add_refcount()
5{
6 auto last = skr_atomicu32_add_relaxed(&rc, 1);
7 return last + 1;
8}
9uint32_t SObjectHeader::release()
10{
11 skr_atomicu32_add_relaxed(&rc, -1);

Callers 1

ReadMethod · 0.45

Calls 1

Tested by

no test coverage detected