fix memory leaks
add tolua.resetcfunction()