Release the semaphore in dealloc, fixing leak.

pull/1131/head
Thomas Van Lenten 9 years ago
parent c64146f195
commit 4d663376e2
  1. 1
      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];
}

Loading…
Cancel
Save