Commit d47c325e authored by Huanqi Chen's avatar Huanqi Chen Committed by Hidenari Koshimae
Browse files

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
parent 83fe0ad3
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment