aboutsummaryrefslogtreecommitdiff
path: root/src/net.cpp
diff options
context:
space:
mode:
authorpracticalswift <practicalswift@users.noreply.github.com>2017-08-09 16:14:37 +0200
committerpracticalswift <practicalswift@users.noreply.github.com>2017-11-09 16:53:34 +0100
commitf72cbf9ba970e997be84fb7b20795c6b9c62fb42 (patch)
tree383f6395e4b38df1b8acb6c97b16b9a90c6be3a6 /src/net.cpp
parent8ccf1bb0c31108762e47f28d9d592e8d4c788564 (diff)
Use unique_ptr for pfilter (CBloomFilter)
Diffstat (limited to 'src/net.cpp')
-rw-r--r--src/net.cpp4
1 files changed, 1 insertions, 3 deletions
diff --git a/src/net.cpp b/src/net.cpp
index 5f0a7a4770..6b0c131cf3 100644
--- a/src/net.cpp
+++ b/src/net.cpp
@@ -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)