MCPcopy Create free account
hub / github.com/Snapchat/Valdi / SimpleRefCountable

Class SimpleRefCountable

valdi_core/src/valdi_core/cpp/Utils/Shared.hpp:41–53  ·  view source on GitHub ↗

* A RefCountable implementation that uses an atomic long * for ref counting. Does not support weak pointers. * If you need weak pointers support, please use SharedPtrRefCountable. */

Source from the content-addressed store, hash-verified

39 * If you need weak pointers support, please use SharedPtrRefCountable.
40 */
41class SimpleRefCountable : public RefCountable {
42public:
43 SimpleRefCountable();
44 ~SimpleRefCountable() override;
45
46 void unsafeRetainInner() final;
47 void unsafeReleaseInner() final;
48
49 long retainCount() const;
50
51private:
52 std::atomic_long _retainCount;
53};
54
55/**
56 * A RefCountable implementation that uses a non atomic

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected