浏览代码

Release the semaphore in dealloc, fixing leak.

Thomas Van Lenten 9 年之前
父节点
当前提交
4d663376e2
共有 1 个文件被更改,包括 1 次插入0 次删除
  1. 1 0
      objectivec/GPBMessage.m

+ 1 - 0
objectivec/GPBMessage.m

@@ -886,6 +886,7 @@ static GPBUnknownFieldSet *GetOrMakeUnknownFields(GPBMessage *self) {
 - (void)dealloc {
 - (void)dealloc {
   [self internalClear:NO];
   [self internalClear:NO];
   NSCAssert(!autocreator_, @"Autocreator was not cleared before dealloc.");
   NSCAssert(!autocreator_, @"Autocreator was not cleared before dealloc.");
+  dispatch_release(readOnlySemaphore_);
   [super dealloc];
   [super dealloc];
 }
 }