Skip to content

[QUESTION] Why to use copy constructor if can write straight to the object #416

Open
@amgross

Description

virtual MessageBuffer create(void) = 0;

How this API is currently, the user of it must have its own object, and the implementation of this API must create the object on its stack/global/whatever and then while returning copy constructor is called.

Why not to make it so the user jut give its object?
virtual MessageBuffer *create(MessageBuffer *buf) = 0;

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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