From 4d663376e2023855e780459cdf612e0e33e3485a Mon Sep 17 00:00:00 2001 From: Thomas Van Lenten Date: Tue, 12 Jan 2016 09:04:08 -0500 Subject: [PATCH] Release the semaphore in dealloc, fixing leak. --- objectivec/GPBMessage.m | 1 + 1 file changed, 1 insertion(+) diff --git a/objectivec/GPBMessage.m b/objectivec/GPBMessage.m index 208cfe4ef4..fdb695ece6 100644 --- a/objectivec/GPBMessage.m +++ b/objectivec/GPBMessage.m @@ -886,6 +886,7 @@ static GPBUnknownFieldSet *GetOrMakeUnknownFields(GPBMessage *self) { - (void)dealloc { [self internalClear:NO]; NSCAssert(!autocreator_, @"Autocreator was not cleared before dealloc."); + dispatch_release(readOnlySemaphore_); [super dealloc]; }