Porting memory fixes
This commit is contained in:
committed by
mtjburton
parent
128139cdeb
commit
effed14ca3
@@ -23,6 +23,8 @@
|
||||
|
||||
using namespace std;
|
||||
|
||||
std::vector<std::unique_ptr<CWalletTx>> wtxn;
|
||||
|
||||
typedef set<pair<const CWalletTx*,unsigned int> > CoinSet;
|
||||
|
||||
BOOST_FIXTURE_TEST_SUITE(wallet_tests, TestingSetup)
|
||||
@@ -50,13 +52,13 @@ static void add_coin(const CAmount& nValue, int nAge = 6*24, bool fIsFromMe = fa
|
||||
}
|
||||
COutput output(wtx, nInput, nAge, true);
|
||||
vCoins.push_back(output);
|
||||
wtxn.emplace_back(std::move(wtx));
|
||||
}
|
||||
|
||||
static void empty_wallet(void)
|
||||
{
|
||||
BOOST_FOREACH(COutput output, vCoins)
|
||||
delete output.tx;
|
||||
vCoins.clear();
|
||||
wtxn.clear();
|
||||
}
|
||||
|
||||
static bool equal_sets(CoinSet a, CoinSet b)
|
||||
|
||||
Reference in New Issue
Block a user