object.inline.h 536 B

12345678910111213141516171819202122232425
  1. #ifndef AFUN_OBJECT_INLINE_H
  2. #define AFUN_OBJECT_INLINE_H
  3. #include "object.h"
  4. namespace aFuncore {
  5. inline void Object::addReference() {
  6. std::unique_lock<std::mutex> mutex{lock};
  7. reference++;
  8. }
  9. inline void Object::delReference() {
  10. std::unique_lock<std::mutex> mutex{lock};
  11. reference--;
  12. }
  13. inline GcCount Object::getReference() const {
  14. return reference;
  15. }
  16. inline void Object::setClear(bool clear) {
  17. not_clear=!clear;
  18. }
  19. }
  20. #endif //AFUN_OBJECT_INLINE_H