[luabind] Luabind memory leak
Brought to you by:
arvidn,
daniel_wallin
From: Luis V. <lui...@mi...> - 2006-01-31 18:17:34
|
I was tracking down a memory look for my Masters project and ran into the following situation: =20 Luabind uses a class function_rep for encapsulating data for specific functions. =20 Function_rep looks something like: =20 Class function_rep { // blablabla std::vector<blablabla> m_overrides; } =20 =20 Instances of this class are managed by lua by using luauserdata. So at some point in the code: =20 Luauserdatanew(function_rep_instance, sizeof(function_rep_instance)); =20 I think the promise is that Lua will clean up the memory when is closed, the problem is that lua performs a free on the memory, but since Lua knows nothing about the type of object the cleanup is not accurate, and the data help by m_overrides is never freed. =20 Is Luabind still being actively developed? If so, is this the right place to report bugs? =20 Thank you, Luis Villegas |