Use shared_ptr instead of raw pointers in packet_analysis for analyzers and dispatchers

This commit is contained in:
Tim Wojtulewicz 2020-07-14 10:26:53 -07:00
parent 07b7a3be40
commit f39d6bb4c4
26 changed files with 89 additions and 98 deletions

View file

@ -12,11 +12,12 @@
namespace zeek::packet_analysis {
class Analyzer;
using AnalyzerPtr = std::shared_ptr<Analyzer>;
class Component : public plugin::Component,
public plugin::TaggedComponent<packet_analysis::Tag> {
public:
typedef Analyzer* (*factory_callback)();
typedef AnalyzerPtr (*factory_callback)();
Component(const std::string& name, factory_callback factory, Tag::subtype_t subtype = 0, bool enabled = true);
~Component() override = default;