Fix memory leaks in mod storage (#7500)
This commit is contained in:
parent
9f19b7d936
commit
227c71eb76
@ -58,6 +58,11 @@ StorageRef::StorageRef(ModMetadata *object):
|
|||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
|
StorageRef::~StorageRef()
|
||||||
|
{
|
||||||
|
delete m_object;
|
||||||
|
}
|
||||||
|
|
||||||
void StorageRef::create(lua_State *L, ModMetadata *object)
|
void StorageRef::create(lua_State *L, ModMetadata *object)
|
||||||
{
|
{
|
||||||
StorageRef *o = new StorageRef(object);
|
StorageRef *o = new StorageRef(object);
|
||||||
|
@ -50,7 +50,7 @@ private:
|
|||||||
|
|
||||||
public:
|
public:
|
||||||
StorageRef(ModMetadata *object);
|
StorageRef(ModMetadata *object);
|
||||||
~StorageRef() = default;
|
~StorageRef();
|
||||||
|
|
||||||
static void Register(lua_State *L);
|
static void Register(lua_State *L);
|
||||||
static void create(lua_State *L, ModMetadata *object);
|
static void create(lua_State *L, ModMetadata *object);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user