Merge pull request #1131 from thomasvl/fix_sem_leak

Release the semaphore in dealloc, fixing leak.
This commit is contained in:
Thomas Van Lenten 2016-01-12 09:05:50 -05:00
commit af8e7ef9a3

View File

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