arpadboda commented on a change in pull request #489: MINIFICPP-740: Add 
ability to run NiFi processors from Java and Python
URL: https://github.com/apache/nifi-minifi-cpp/pull/489#discussion_r260294877
 
 

 ##########
 File path: libminifi/include/provenance/Provenance.h
 ##########
 @@ -460,25 +460,25 @@ class ProvenanceReporter {
     clear();
   }
   // Get events
-  std::set<ProvenanceEventRecord *> getEvents() {
+  std::set<std::shared_ptr<ProvenanceEventRecord>> getEvents() {
     return _events;
   }
   // Add event
-  void add(ProvenanceEventRecord *event) {
+  void add(const std::shared_ptr<ProvenanceEventRecord> &event) {
     _events.insert(event);
   }
   // Remove event
-  void remove(ProvenanceEventRecord *event) {
+  void remove(const std::shared_ptr<ProvenanceEventRecord> &event) {
     if (_events.find(event) != _events.end()) {
       _events.erase(event);
     }
   }
   //
   // clear
   void clear() {
-    for (auto it : _events) {
-      delete it;
-    }
+    //for (auto it : _events) {
 
 Review comment:
   Delete?

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
[email protected]


With regards,
Apache Git Services

Reply via email to