Extra Copy of Object in Future Somewhere
KevinHopps opened this issue · 0 comments
KevinHopps commented
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.