-
Notifications
You must be signed in to change notification settings - Fork 49
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
Performance improvement suggestion #39
Comments
Thanks for opening the issue. We'll definitely fix this and any others you find. As the app is approaching stability we are going to be focusing some energy on performance so finds like this will surely help. |
also, that link doesn't describe the resource leakage pattern, did you mean to paste a different link? |
I've added the issue to our backlog to make sure we don't loose track. https://trello.com/c/lcQIguPk/67-replace-addcallback-with-removecallback Thanks for the suggestion. |
Thanks for your prompt reply. If you are interested in the resource leakage pattern, you can find more detailed discussion in "Characterizing and Detecting Resource Leaks in Android Applications" which can be found in the following link: In short, they summarize 65 resource operations which involve resources that need to be Hope this help. |
Dear developers,
I am a big fan of storymaker, 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 storymaker's code. These violations could affect the performance of your app. Here is a representative one.
In info.guardianproject.mrapp.media.VideoCamera, the method onCreate() invokes "addCallback" to add a Callback interface for this holder. However, according to the suggestion of android developer, it is a good practice to use "removeCallback " to removes a previously added callback interface from this holder. Unfortunately, this principle is not correctly applied in this class.
So I am curious :) Looking forward to your response. Thanks.
References:
resource leakage pattern: http://developer.android.com/reference/android/view/SurfaceHolder.html#addCallback(android.view.SurfaceHolder.Callback)
The text was updated successfully, but these errors were encountered: