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]; }