Skip to content

Extra Copy of Object in Future Somewhere #504

@KevinHopps

Description

@KevinHopps

I have some code that returns a future object of my class vm::page_t and my internal bookkeeping tells me that there are two copies of thing when this continuation is called. If I set a breakpoint in its copy constructor, for example, I can see it being called from boost::optional_detail::optional_base<vm::page_t>::construct(vm::page_t const&)

f.then([](vm::page_t thing) { /* there is another copy of thing somewhere */ });

This may not seem like a big deal, because all of the copies are eventually destroyed, but this class depends on the number of copies being accurate.

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