celix-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From GitBox <...@apache.org>
Subject [GitHub] [celix] pnoltes commented on a change in pull request #310: Adds initial impl for the C++ headers only wrappers
Date Sun, 21 Feb 2021 16:18:16 GMT

pnoltes commented on a change in pull request #310:
URL: https://github.com/apache/celix/pull/310#discussion_r579829664



##########
File path: examples/celix-examples/dm_example_cxx/phase1/src/Phase1Activator.cc
##########
@@ -38,17 +38,22 @@ struct InvalidCServ {
 };
 
 Phase1Activator::Phase1Activator(std::shared_ptr<celix::dm::DependencyManager> mng)
{
-    auto cmp = std::shared_ptr<Phase1Cmp>(new Phase1Cmp());
+    dm = mng;
+    auto& cmp = mng->createComponent<Phase1Cmp>();  //using a pointer a instance.
Also supported is lazy initialization (default constructor needed) or a rvalue reference (move)

Review comment:
       removed comment. this was outdated.




----------------------------------------------------------------
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



Mime
View raw message