Use std::move when deleting CTransactions from CTxMempool #8099

issue sipa openend this issue on May 25, 2016
  1. sipa commented at 3:31 pm on May 25, 2016: member

    Currently, many CTxMempool::remove*() functions copy the transaction they delete to a std::list, and then erase the mempool entries. This copy + erase can be avoided by using c++11’s std::move.

    Practically, this would mean passing a std::list<CTransaction>& to all remove* functions, down to removeUnchecked, which would move the CTransactions being deleted to that list before calling the erase method on maptx.

  2. fanquake commented at 8:33 am on November 7, 2016: member
    Think this can be closed after #8515 ?
  3. sipa closed this on Nov 7, 2016

  4. MarcoFalke locked this on Sep 8, 2021

github-metadata-mirror

This is a metadata mirror of the GitHub repository bitcoin/bitcoin. This site is not affiliated with GitHub. Content is generated from a GitHub metadata backup.
generated: 2024-12-18 18:12 UTC

This site is hosted by @0xB10C
More mirrored repositories can be found on mirror.b10c.me