Skip to content

Do not use AllocHGlobal when creating copies #1230

Open
@ddobrev

Description

@ddobrev

The problem is that such memory must always be freed with FreeHGlobal but it's difficult for the user to always do so. Conversion operators are an example. Instead of AllocHGlobal, we could use a regular managed C# field of type the internal structure. There are problems such as this field being allocated as soon as declared since it's a struct, which is inefficient, but it needs to be at least considered.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions