Skip to content

Commit cd1d8c5

Browse files
committed
Merge branch 'registry-member' of github.com:lia-viam/viam-cpp-sdk into registry-member
2 parents 1758ee9 + 7560f6d commit cd1d8c5

File tree

2 files changed

+4
-0
lines changed

2 files changed

+4
-0
lines changed

src/viam/examples/modules/simple/client.cpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,8 @@
1111
using namespace viam::sdk;
1212

1313
int main() {
14+
// Every Viam C++ SDK program must have one and only one Instance object which is created before
15+
// any other C++ SDK objects and stays alive until all Viam C++ SDK objects are destroyed.
1416
Instance inst;
1517

1618
const char* uri = "http://localhost:8080/"; // replace with your URI if connecting securely

src/viam/examples/modules/simple/main.cpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -76,6 +76,8 @@ ProtoStruct MySensor::get_readings(const ProtoStruct&) {
7676
}
7777

7878
int main(int argc, char** argv) try {
79+
// Every Viam C++ SDK program must have one and only one Instance object which is created before
80+
// any other C++ SDK objects and stays alive until all Viam C++ SDK objects are destroyed.
7981
Instance inst;
8082

8183
Model mysensor_model("viam", "sensor", "mysensor");

0 commit comments

Comments
 (0)