mirror of
https://github.com/love2d/love.git
synced 2026-08-17 19:23:38 +02:00
Fix more memory leaks (issue #327)
This commit is contained in:
@@ -77,7 +77,7 @@ namespace box2d
|
|||||||
|
|
||||||
Contact * c = new Contact(contact);
|
Contact * c = new Contact(contact);
|
||||||
|
|
||||||
luax_newtype(L, "Contact", (PHYSICS_CONTACT_T), (void*)c, false);
|
luax_newtype(L, "Contact", (PHYSICS_CONTACT_T), (void*)c, true);
|
||||||
|
|
||||||
int args = 3;
|
int args = 3;
|
||||||
if (impulse) {
|
if (impulse) {
|
||||||
|
|||||||
@@ -262,8 +262,13 @@ namespace thread
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
{
|
||||||
data = luax_checktype<love::Data>(L, 2, "Data", DATA_T);
|
data = luax_checktype<love::Data>(L, 2, "Data", DATA_T);
|
||||||
|
data->retain();
|
||||||
|
}
|
||||||
Thread *t = instance->newThread(name, data);
|
Thread *t = instance->newThread(name, data);
|
||||||
|
// do not worry, file->read() returns retained data
|
||||||
|
data->release();
|
||||||
if (!t)
|
if (!t)
|
||||||
return luaL_error(L, "A thread with that name already exists.");
|
return luaL_error(L, "A thread with that name already exists.");
|
||||||
luax_newtype(L, "Thread", THREAD_THREAD_T, (void*)t);
|
luax_newtype(L, "Thread", THREAD_THREAD_T, (void*)t);
|
||||||
|
|||||||
Reference in New Issue
Block a user