m_local_journal->stop_external_replay();
m_local_replay = nullptr;
- delete m_event_preprocessor;
+ EventPreprocessor<I>::destroy(m_event_preprocessor);
m_event_preprocessor = nullptr;
ctx->complete(0);
});
m_local_ioctx.close();
m_remote_ioctx.close();
- delete m_replay_status_formatter;
+ ReplayStatusFormatter<I>::destroy(m_replay_status_formatter);
m_replay_status_formatter = nullptr;
Context *on_start = nullptr;
local_mirror_uuid, client_meta, work_queue);
}
+ static void destroy(EventPreprocessor* processor) {
+ delete processor;
+ }
+
EventPreprocessor(ImageCtxT &local_image_ctx, Journaler &remote_journaler,
const std::string &local_mirror_uuid,
MirrorPeerClientMeta *client_meta, ContextWQ *work_queue);
return new ReplayStatusFormatter(journaler, mirror_uuid);
}
+ static void destroy(ReplayStatusFormatter* formatter) {
+ delete formatter;
+ }
+
ReplayStatusFormatter(Journaler *journaler, const std::string &mirror_uuid);
bool get_or_send_update(std::string *description, Context *on_finish);