Skip to content

Memory behavior of functions taking wchar_t pointers is not documented #10

@realnc

Description

@realnc

Hello, and thanks for this library!

One thing that is not clear in the API, is who's responsible for the wchar_t* data passed to the various functions. For example, does Tolk_Output() take ownership? Should I delete it? Is it copied? In other words:

auto buf = new wchar_t[txt_len];
// ...
Talk_Output(buf);
delete[] buf; // Is this safe? Is Talk_Output() going to read from the deleted buffer?

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