Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

FeedbackServiceManager.getDevice() needs to close socket in a finally block #45

Closed
GoogleCodeExporter opened this issue Oct 19, 2015 · 2 comments

Comments

@GoogleCodeExporter
Copy link

I think it is good that there's no FeedbackServiceManager.close() method, and 
socket's life cycle is encapsulated in the class, if we are sure socket is 
closed when done.

In the current version, socket.close() is called at the end of the getDevice() 
method, but not in a finally block.  Any exception, such as NPE, thrown in the 
getDevice() method can cause memory leak which the caller will not be able to 
close.  

Would it be possible to move the close statement to a finally block?

Thanks,
Eric

Original issue reported on code.google.com by eric...@gmail.com on 7 Apr 2011 at 3:44

@GoogleCodeExporter
Copy link
Author

Original comment by idbill.p...@gmail.com on 17 Apr 2011 at 4:31

  • Changed state: Accepted

@GoogleCodeExporter
Copy link
Author

Applied to version 1.6.7

Original comment by idbill.p...@gmail.com on 22 Apr 2011 at 9:54

  • Changed state: Done

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant