Reference counting for love objects is now atomic.

--HG--
branch : minor
This commit is contained in:
Alex Szpakowski
2014-08-13 02:43:50 -03:00
parent df5e48a082
commit 0c1b73e2ca
3 changed files with 16 additions and 13 deletions
+4 -1
View File
@@ -21,6 +21,8 @@
#ifndef LOVE_OBJECT_H
#define LOVE_OBJECT_H
#include <atomic>
namespace love
{
@@ -40,6 +42,7 @@ public:
* Constructor. Sets reference count to one.
**/
Object();
Object(const Object &other);
/**
* Destructor.
@@ -155,7 +158,7 @@ public:
private:
// The reference count.
int count;
std::atomic<int> count;
}; // Object