Fixing PrintWriter not being disposed
When there is an exception being thrown, the getStackTrace method of JNIHelp will initialize a PrintWriter to print the exception message. But the instance of the PrintWriter will not be disposed, because PrintWriter will hold the string reference, and finally the local reference table of VM will overflow. Then system will crash. The change disposes the PrintWriter from the local reference table to prevent the overflow. Change-Id: Ie8dcb3d941034e6e1f480196373189f2d152cf79
Loading
Please sign in to comment