#pragma once

#include <atomic>
#include <cstdint>
#include <frostbite2D/base/Noncopyable.h>

namespace frostbite2D {

class RefObject : protected Noncopyable {
public:
  void Retain();
  void Release();
  uint32_t GetRefCount() const;

  virtual ~RefObject();

protected:
  RefObject();

private:
  std::atomic<uint32_t> ref_count_;
};

}
