Skip to content

wxLua error functions leak memory #145

@solemnwarning

Description

@solemnwarning

The functions used for raising errors from wxLua bindings (e.g. bad arguments) internally call luaL_error(), which jumps out of the current stack frame, bypassing any C++ object cleanup. Even if glue code is written expecting this, internal functions in wxLua (e.g. wxlua_argerror()) create objects on the stack, which are still leaked.

I think wxlua_error() should instead throw an exception which is caught by the outer layer of wx(Lua) glue code and then turned into a Lua exception.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions