HomePhabricator

Use std::unique_ptr for CZMQNotifierFactory.

Description

Use std::unique_ptr for CZMQNotifierFactory.

Summary:
Instead of returning a raw pointer from CZMQNotifierFactory and
implicitly requiring the caller to know that it has to take ownership,
return a std::unique_ptr to make this explicit.

This also changes the typedef for CZMQNotifierFactory to use the new
C++11 using syntax, which makes it (a little) less cryptic.

This is a backport of core#13686 [3/5]
https://github.com/bitcoin/bitcoin/pull/13686/commits/7f2ad1b9acef4ccc1b3e1a9f551416235d95cbfd

Depends on D10283

Test Plan: ninja all check-all

Reviewers: #bitcoin_abc, Fabien

Reviewed By: #bitcoin_abc, Fabien

Differential Revision: https://reviews.bitcoinabc.org/D10284

Details

Provenance
Daniel Kraft <d@domob.eu>Authored on Jul 17 2018, 10:36
PiRKCommitted on Oct 11 2021, 07:01
PiRKPushed on Oct 11 2021, 07:02
Reviewer
Restricted Project
Differential Revision
D10284: Use std::unique_ptr for CZMQNotifierFactory.
Parents
rABC9a008904eed3: Simplify and fix notifier removal on error.
Branches
Unknown
Tags
Unknown