Skip to content
This repository has been archived by the owner on Jan 25, 2018. It is now read-only.

Performance improvement suggestion #434

Open
00conan00 opened this issue Mar 28, 2014 · 1 comment
Open

Performance improvement suggestion #434

00conan00 opened this issue Mar 28, 2014 · 1 comment
Labels
Milestone

Comments

@00conan00
Copy link

Dear developers,

I am a big fan of chat secure, and recently I am writing a static code analysis tool to conduct performance analysis for Android apps. I found several violations of "resource leakage" patterns in chat secure's code. These violations could affect the performance of your app. Here is a representative one.

In info.guardianproject.otr.app.im.app.ChatView$DataAdapter$1, the method handleMessage() invokes "new MediaPlayer();" to create MediaPlayer. However, according to the suggestion of android developer, when done with the MediaPlayer, it is a good practice to call release(), to free the resources. If not released, too many MediaPlayer instances may result in an exception. Unfortunately, this principle is not correctly applied in this method.

So I am curious :) Looking forward to your response. Thanks.

References:
resource leakage pattern: http://developer.android.com/reference/android/media/MediaPlayer.html

@n8fr8 n8fr8 added this to the Future Release milestone Apr 14, 2014
@n8fr8 n8fr8 added the FEATURE label Apr 14, 2014
@ghost
Copy link

ghost commented Aug 21, 2014

@00conan00 It were really helpful if you could provide a pull request with a path.

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

No branches or pull requests

2 participants