Skip to content

Bytes#Resize memory leak on HashLink #2054

Description

@NotHyper-474

On HashLink, Bytes is directly used as a structure for an instance of haxe.io.Bytes, unlike in HXCPP where these are instantiated from a passed value parameter, the problem is that only in the latter this allows the allocated buffer to be disposed when no longer in use. From my understanding, it was presumed that simply assigning the address to b would allow it to be tracked by the GC, which according to this is incorrect.
This is not only theory; when profiling an application, I've observed unfreed memory coming from the function.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions