lbrycrd/src/wallet
Wladimir J. van der Laan 5e9be169e4
Merge #11043: Use std::unique_ptr (C++11) where possible
a357293 Use MakeUnique<Db>(...) (practicalswift)
3e09b39 Use MakeUnique<T>(...) instead of std::unique_ptr<T>(new T(...)) (practicalswift)
8617989 Add MakeUnique (substitute for C++14 std::make_unique) (practicalswift)
d223bc9 Use unique_ptr for pcoinscatcher/pcoinsdbview/pcoinsTip/pblocktree (practicalswift)
b45c597 Use unique_ptr for pdbCopy (Db) and fix potential memory leak (practicalswift)
29ab96d Use unique_ptr for dbenv (DbEnv) (practicalswift)
f72cbf9 Use unique_ptr for pfilter (CBloomFilter) (practicalswift)
8ccf1bb Use unique_ptr for sem{Addnode,Outbound} (CSemaphore) (practicalswift)
73db063 Use unique_ptr for upnp_thread (boost::thread) (practicalswift)
0024531 Use unique_ptr for dbw (CDBWrapper) (practicalswift)
fa6d122 Use unique_ptr:s for {fee,short,long}Stats (TxConfirmStats) (practicalswift)
5a6f768 Use unique_ptr for httpRPCTimerInterface (HTTPRPCTimerInterface) (practicalswift)
860e912 Use unique_ptr for pwalletMain (CWallet) (practicalswift)

Pull request description:

  Use `std::unique_ptr` (C++11) where possible.

  Rationale:
  1. Avoid resource leaks (specifically: forgetting to `delete` an object created using `new`)
  2. Avoid undefined behaviour (specifically: double `delete`:s)

  **Note to reviewers:** Please let me know if I've missed any obvious `std::unique_ptr` candidates. Hopefully this PR should cover all the trivial cases.

Tree-SHA512: 9fbeb47b800ab8ff4e0be9f2a22ab63c23d5c613a0c6716d9183db8d22ddbbce592fb8384a8b7874bf7375c8161efb13ca2197ad6f24b75967148037f0f7b20c
2017-11-09 21:34:25 +01:00
..
test Use MakeUnique<T>(...) instead of std::unique_ptr<T>(new T(...)) 2017-11-09 16:53:34 +01:00
coincontrol.h Make QT fee displays use GetMinimumFee instead of estimateSmartFee 2017-07-14 23:41:37 -04:00
crypter.cpp Merge #11272: CKeystore/CCrypter: move relevant implementation out of the header 2017-11-09 21:11:57 +01:00
crypter.h Merge #11272: CKeystore/CCrypter: move relevant implementation out of the header 2017-11-09 21:11:57 +01:00
db.cpp Use MakeUnique<Db>(...) 2017-11-09 16:53:34 +01:00
db.h Use unique_ptr for dbenv (DbEnv) 2017-11-09 16:53:34 +01:00
feebumper.cpp Merge #10368: [wallet] Remove helper conversion operator from wallet 2017-11-09 14:23:13 +01:00
feebumper.h Refactor to use CoinControl in GetMinimumFee and FeeBumper 2017-07-14 23:10:58 -04:00
fees.cpp MOVEONLY: Fee functions wallet/wallet.cpp -> wallet/fees.cpp 2017-08-14 11:19:38 -04:00
fees.h Move some static functions out of wallet.h/cpp 2017-08-14 11:19:38 -04:00
init.cpp Fix -disablewallet default value 2017-11-07 19:13:38 +00:00
init.h [trivial] fixup comment for VerifyWallets() 2017-09-07 16:22:11 -07:00
rpcdump.cpp Merge #10368: [wallet] Remove helper conversion operator from wallet 2017-11-09 14:23:13 +01:00
rpcwallet.cpp Merge #10368: [wallet] Remove helper conversion operator from wallet 2017-11-09 14:23:13 +01:00
rpcwallet.h [wallet] Add RegisterWalletRPC() function to wallet/init.cpp 2017-09-07 16:21:26 -07:00
wallet.cpp Use MakeUnique<T>(...) instead of std::unique_ptr<T>(new T(...)) 2017-11-09 16:53:34 +01:00
wallet.h Merge #10368: [wallet] Remove helper conversion operator from wallet 2017-11-09 14:23:13 +01:00
walletdb.cpp Merge #10368: [wallet] Remove helper conversion operator from wallet 2017-11-09 14:23:13 +01:00
walletdb.h Refactor: Modernize disallowed copy constructors/assignment 2017-09-16 13:06:05 +03:00