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

Fix for issue #35: OutOfMemoryError in MaterialShowcaseView.onDraw #40

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

mdivkovic
Copy link

Removed references to a second canvas and a bitmap for the background mask from the ShowcaseView class to prevent additional memory retention and eventual OOMEs. Now onDraw uses the passed-in canvas and nothing else - though this did come at the cost of having to disable hardware acceleration for this view, it doesn't seem to have any performance drawbacks.

I attached two screenshots from Crashlytics of an app I'm working on, first one from the initial release which included MaterialShowcaseView, the second one from the following release where I applied this fix.

initial_release
post_fix

It went from the top crash cause to completely disappearing from the list.

… mask from the ShowcaseView class to prevent additional memory retention and eventuall OOMEs. Now onDraw uses the passed-in canvas and nothing else - though this did come at the cost of having to disable hardware acceleration for this view, it doesn't seem to have any performance drawbacks.
@Jawnnypoo
Copy link

This really is a better way of doing the clear

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

Successfully merging this pull request may close these issues.

3 participants