Reduced the number of explicit retain/release method calls on love objects. Less chance of bugs!

This commit is contained in:
Alex Szpakowski
2014-08-07 14:53:17 -03:00
parent a0fff798aa
commit d59c76a55f
38 changed files with 194 additions and 247 deletions
-3
View File
@@ -37,14 +37,11 @@ LuaThread::LuaThread(const std::string &name, love::Data *code)
, args(0)
, nargs(0)
{
code->retain();
threadName = name;
}
LuaThread::~LuaThread()
{
code->release();
// No args should still exist at this point,
// but you never know.
for (int i = 0; i < nargs; ++i)
+1 -1
View File
@@ -50,7 +50,7 @@ private:
void onError();
love::Data *code;
Object::StrongRef<love::Data> code;
std::string name;
std::string error;