mirror of
https://github.com/love2d/love.git
synced 2026-08-15 15:51:12 +02:00
Reduced the number of explicit retain/release method calls on love objects. Less chance of bugs!
This commit is contained in:
@@ -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)
|
||||
|
||||
@@ -50,7 +50,7 @@ private:
|
||||
|
||||
void onError();
|
||||
|
||||
love::Data *code;
|
||||
Object::StrongRef<love::Data> code;
|
||||
std::string name;
|
||||
std::string error;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user