We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent da0da2b commit 2029603Copy full SHA for 2029603
unified-runtime/source/common/ur_ref_count.hpp
@@ -18,14 +18,14 @@ namespace ur {
18
19
class RefCount {
20
public:
21
- RefCount(uint32_t count = 1) : Count(count) {}
+ RefCount(uint32_t count = 0) : Count(count) {}
22
RefCount(const RefCount &) = delete;
23
RefCount &operator=(const RefCount &) = delete;
24
25
uint32_t getCount() const noexcept { return Count.load(); }
26
uint32_t retain() { return ++Count; }
27
bool release() { return --Count == 0; }
28
- void reset(uint32_t value = 1) { Count = value; }
+ void reset(uint32_t value = 0) { Count = value; }
29
30
private:
31
std::atomic_uint32_t Count;
0 commit comments