SIGN IN SIGN UP

Protocol Buffers - Google's data interchange format

0 0 2 C++

[objectivec] Fix memory leak of exceptions raised by RaiseException() (#4556)

* Fix memory leak of exceptions raised by RaiseException()

Currently exceptions raised by RaiseException() is never deallocated because:

* ARC is disabled for this library: https://github.com/google/protobuf/blob/master/BUILD#L913
* It is constructed with `+alloc` but is never `-release`d.

This change fixes the issue by using `-[NSException exceptionWithName:...]` instead, which returns an autoreleased instance, so it is deallocated properly.

* Fix format.
H
Hiroshi Ichikawa committed
7d978084ca28ac8a456dbdd9d6b39e6dfc169fd9
Parent: fc922d1
Committed by Thomas Van Lenten <thomasvl@google.com> on 4/30/2018, 3:44:41 PM