CommonLibSSE (Parapets fork)
Loading...
Searching...
No Matches
BSIntrusiveRefCounted.h
Go to the documentation of this file.
1#pragma once
2
4
5namespace RE
6{
8 {
9 public:
10 template <class>
12
13 std::uint32_t IncRef() const
14 {
15 stl::atomic_ref myRefCount{ _refCount };
16 return ++myRefCount;
17 }
18
19 std::uint32_t DecRef() const
20 {
21 stl::atomic_ref myRefCount{ _refCount };
22 return --myRefCount;
23 }
24
26
27 protected:
28 // members
29 mutable volatile std::uint32_t _refCount{ 0 }; // 0
30 };
31 static_assert(sizeof(BSIntrusiveRefCounted) == 0x4);
32}
Definition: PCH.h:435
Definition: AbsorbEffect.h:6
Definition: BSIntrusiveRefCounted.h:8
volatile std::uint32_t _refCount
Definition: BSIntrusiveRefCounted.h:29
std::uint32_t IncRef() const
Definition: BSIntrusiveRefCounted.h:13
std::uint32_t DecRef() const
Definition: BSIntrusiveRefCounted.h:19
Definition: BSTSmartPointer.h:7