Skip to content

Proposed fixes to memory management issues with parsing #62

@VisenDev

Description

@VisenDev

Here's an issue I've realized we have with the current parsing setup

Currently, when parsing a struct with lots of different arrays and pointers from a lua table, freeing that memory could get quite complex. The toAny and autoCall functions should be modified to return a ziglua.Parsed struct which contains an arena allocator which can be used to free the memory easily.

We can also add a toAnyLeaky and autoCallLeaky that leaves memory deallocation to be done manually as happens in the current implementation (as a toAny call may not necessarily require a memory allocation).

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