mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-11-13 07:28:59 +01:00
Use unique_ptr for pfilter (CBloomFilter)
This commit is contained in:
@@ -2741,7 +2741,7 @@ CNode::CNode(NodeId idIn, ServiceFlags nLocalServicesIn, int nMyStartingHeightIn
|
||||
nNextInvSend = 0;
|
||||
fRelayTxes = false;
|
||||
fSentAddr = false;
|
||||
pfilter = new CBloomFilter();
|
||||
pfilter = std::unique_ptr<CBloomFilter>(new CBloomFilter());
|
||||
timeLastMempoolReq = 0;
|
||||
nLastBlockTime = 0;
|
||||
nLastTXTime = 0;
|
||||
@@ -2771,8 +2771,6 @@ CNode::CNode(NodeId idIn, ServiceFlags nLocalServicesIn, int nMyStartingHeightIn
|
||||
CNode::~CNode()
|
||||
{
|
||||
CloseSocket(hSocket);
|
||||
|
||||
delete pfilter;
|
||||
}
|
||||
|
||||
void CNode::AskFor(const CInv& inv)
|
||||
|
||||
Reference in New Issue
Block a user