You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@nifi.apache.org by GitBox <gi...@apache.org> on 2021/03/25 10:16:50 UTC

[GitHub] [nifi-minifi-cpp] lordgamez commented on a change in pull request #1035: MINIFI-1354: Memory leaks in nanofi and its unittests

lordgamez commented on a change in pull request #1035:
URL: https://github.com/apache/nifi-minifi-cpp/pull/1035#discussion_r601302083



##########
File path: nanofi/src/api/nanofi.cpp
##########
@@ -131,20 +131,26 @@ nifi_instance *create_instance_repo(const char *url, nifi_port *port, const char
   return instance;
 }
 
+nifi_instance * acquire_standalone_instance () {
+  if (standalone_instance == nullptr) {
+    nifi_port port;
+    auto port_str = utils::IdGenerator::getIdGenerator()->generate().to_string();
+    port.port_id = const_cast<char *>(port_str.c_str());

Review comment:
       We could initialize the port here like
   ```
   nifi_port port{const_cast<char *>(port_str.c_str())};
   ```




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org