aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
-rw-r--r--src/php/ext/grpc/call.c2
-rw-r--r--src/php/ext/grpc/call_credentials.c1
-rw-r--r--src/php/ext/grpc/channel.c1
-rw-r--r--src/php/ext/grpc/channel_credentials.c1
-rw-r--r--src/php/ext/grpc/server.c1
-rw-r--r--src/php/ext/grpc/server_credentials.c1
-rw-r--r--src/php/ext/grpc/timeval.c6
7 files changed, 12 insertions, 1 deletions
diff --git a/src/php/ext/grpc/call.c b/src/php/ext/grpc/call.c
index a0f3d160c6..b19e8f017f 100644
--- a/src/php/ext/grpc/call.c
+++ b/src/php/ext/grpc/call.c
@@ -65,6 +65,7 @@ void free_wrapped_grpc_call(void *object TSRMLS_DC) {
if (call->owned && call->wrapped != NULL) {
grpc_call_destroy(call->wrapped);
}
+ zend_object_std_dtor(&call->std TSRMLS_CC);
efree(call);
}
@@ -96,6 +97,7 @@ zval *grpc_php_wrap_call(grpc_call *wrapped, bool owned) {
wrapped_grpc_call *call =
(wrapped_grpc_call *)zend_object_store_get_object(call_object TSRMLS_CC);
call->wrapped = wrapped;
+ call->owned = owned;
return call_object;
}
diff --git a/src/php/ext/grpc/call_credentials.c b/src/php/ext/grpc/call_credentials.c
index 285c4e7c85..ce9cbdf226 100644
--- a/src/php/ext/grpc/call_credentials.c
+++ b/src/php/ext/grpc/call_credentials.c
@@ -60,6 +60,7 @@ void free_wrapped_grpc_call_credentials(void *object TSRMLS_DC) {
if (creds->wrapped != NULL) {
grpc_call_credentials_release(creds->wrapped);
}
+ zend_object_std_dtor(&creds->std TSRMLS_CC);
efree(creds);
}
diff --git a/src/php/ext/grpc/channel.c b/src/php/ext/grpc/channel.c
index eba2c81424..665430b99c 100644
--- a/src/php/ext/grpc/channel.c
+++ b/src/php/ext/grpc/channel.c
@@ -64,6 +64,7 @@ void free_wrapped_grpc_channel(void *object TSRMLS_DC) {
if (channel->wrapped != NULL) {
grpc_channel_destroy(channel->wrapped);
}
+ zend_object_std_dtor(&channel->std TSRMLS_CC);
efree(channel);
}
diff --git a/src/php/ext/grpc/channel_credentials.c b/src/php/ext/grpc/channel_credentials.c
index ae9a9897fc..d5a6531b54 100644
--- a/src/php/ext/grpc/channel_credentials.c
+++ b/src/php/ext/grpc/channel_credentials.c
@@ -59,6 +59,7 @@ void free_wrapped_grpc_channel_credentials(void *object TSRMLS_DC) {
if (creds->wrapped != NULL) {
grpc_channel_credentials_release(creds->wrapped);
}
+ zend_object_std_dtor(&creds->std TSRMLS_CC);
efree(creds);
}
diff --git a/src/php/ext/grpc/server.c b/src/php/ext/grpc/server.c
index ca129e76ca..0d12bbe5c2 100644
--- a/src/php/ext/grpc/server.c
+++ b/src/php/ext/grpc/server.c
@@ -69,6 +69,7 @@ void free_wrapped_grpc_server(void *object TSRMLS_DC) {
gpr_inf_future(GPR_CLOCK_REALTIME), NULL);
grpc_server_destroy(server->wrapped);
}
+ zend_object_std_dtor(&server->std TSRMLS_CC);
efree(server);
}
diff --git a/src/php/ext/grpc/server_credentials.c b/src/php/ext/grpc/server_credentials.c
index f3951b31fe..25a2ca577d 100644
--- a/src/php/ext/grpc/server_credentials.c
+++ b/src/php/ext/grpc/server_credentials.c
@@ -58,6 +58,7 @@ void free_wrapped_grpc_server_credentials(void *object TSRMLS_DC) {
if (creds->wrapped != NULL) {
grpc_server_credentials_release(creds->wrapped);
}
+ zend_object_std_dtor(&creds->std TSRMLS_CC);
efree(creds);
}
diff --git a/src/php/ext/grpc/timeval.c b/src/php/ext/grpc/timeval.c
index 4fd069e19a..102361d404 100644
--- a/src/php/ext/grpc/timeval.c
+++ b/src/php/ext/grpc/timeval.c
@@ -53,7 +53,11 @@
zend_class_entry *grpc_ce_timeval;
/* Frees and destroys an instance of wrapped_grpc_call */
-void free_wrapped_grpc_timeval(void *object TSRMLS_DC) { efree(object); }
+void free_wrapped_grpc_timeval(void *object TSRMLS_DC) {
+ wrapped_grpc_timeval *timeval = (wrapped_grpc_timeval *)object;
+ zend_object_std_dtor(&timeval->std TSRMLS_CC);
+ efree(object);
+}
/* Initializes an instance of wrapped_grpc_timeval to be associated with an
* object of a class specified by class_type */