From f7b01874fde5b276500f69dcd83ca713cde2e10b Mon Sep 17 00:00:00 2001 From: thinkerou Date: Wed, 11 May 2016 10:23:26 +0800 Subject: [PATCH] add ownend and delete dtor --- src/php/ext/grpc/call.c | 1 - src/php/ext/grpc/call_credentials.c | 1 - src/php/ext/grpc/channel.c | 1 - src/php/ext/grpc/channel_credentials.c | 1 - src/php/ext/grpc/server.c | 1 - src/php/ext/grpc/server_credentials.c | 1 - src/php/ext/grpc/timeval.c | 6 +----- 7 files changed, 1 insertion(+), 11 deletions(-) diff --git a/src/php/ext/grpc/call.c b/src/php/ext/grpc/call.c index b19e8f017f9..a2c1c08169f 100644 --- a/src/php/ext/grpc/call.c +++ b/src/php/ext/grpc/call.c @@ -65,7 +65,6 @@ 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); } diff --git a/src/php/ext/grpc/call_credentials.c b/src/php/ext/grpc/call_credentials.c index ce9cbdf2269..285c4e7c856 100644 --- a/src/php/ext/grpc/call_credentials.c +++ b/src/php/ext/grpc/call_credentials.c @@ -60,7 +60,6 @@ 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 665430b99cd..eba2c81424d 100644 --- a/src/php/ext/grpc/channel.c +++ b/src/php/ext/grpc/channel.c @@ -64,7 +64,6 @@ 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 d5a6531b54e..ae9a9897fcd 100644 --- a/src/php/ext/grpc/channel_credentials.c +++ b/src/php/ext/grpc/channel_credentials.c @@ -59,7 +59,6 @@ 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 0d12bbe5c29..ca129e76ca1 100644 --- a/src/php/ext/grpc/server.c +++ b/src/php/ext/grpc/server.c @@ -69,7 +69,6 @@ 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 25a2ca577d1..f3951b31fee 100644 --- a/src/php/ext/grpc/server_credentials.c +++ b/src/php/ext/grpc/server_credentials.c @@ -58,7 +58,6 @@ 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 102361d404e..4fd069e19a1 100644 --- a/src/php/ext/grpc/timeval.c +++ b/src/php/ext/grpc/timeval.c @@ -53,11 +53,7 @@ zend_class_entry *grpc_ce_timeval; /* Frees and destroys an instance of wrapped_grpc_call */ -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); -} +void free_wrapped_grpc_timeval(void *object TSRMLS_DC) { efree(object); } /* Initializes an instance of wrapped_grpc_timeval to be associated with an * object of a class specified by class_type */