Invoke terminated callbacks before finishing the stub object 40/174440/2
authorJunghoon Park <jh9216.park@samsung.com>
Mon, 2 Apr 2018 07:10:36 +0000 (16:10 +0900)
committerJunghoon Park <jh9216.park@samsung.com>
Mon, 2 Apr 2018 08:05:18 +0000 (17:05 +0900)
Change-Id: I7639f34418ea84be9891fd92df63ec56117fa405
Signed-off-by: Junghoon Park <jh9216.park@samsung.com>
idlc/cpp_gen/cpp_stub_body_gen_cb.h

index 09953eb..f5bcb47 100644 (file)
@@ -28,6 +28,10 @@ $$::$$() {
 const char CB_DEFAULT_METHODS[] =
 R"__cpp_cb(
 $$::~$$() {
+  for (auto& i : services_) {
+    i->OnTerminate();
+  }
+
   if (stub_) {
     rpc_port_stub_destroy(stub_);
   }