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

Isn't rotatedImage != rotatedImage always true? #394

Open
retyui opened this issue Feb 3, 2024 · 4 comments
Open

Isn't rotatedImage != rotatedImage always true? #394

retyui opened this issue Feb 3, 2024 · 4 comments

Comments

@retyui
Copy link

retyui commented Feb 3, 2024

Describe the bug

Hi bam engineers. can you explain how the next line should works

if (rotatedImage != rotatedImage) {
sourceImage.recycle();
}

@macksal
Copy link

macksal commented Feb 12, 2024

As an optimisation, it could be possible for rotateImage() to return the same Bitmap when rotation=0.

@0xc22b
Copy link

0xc22b commented Mar 27, 2024

Should it be rotatedImage != sourceImage?

@macksal
Copy link

macksal commented Apr 12, 2024

ha, you're right. I wonder if there's a memory leak because of this? Not sure if Bitmap.recycle is necessary to call or if it can still be GC'd

@taboulot
Copy link
Contributor

Hey !
Indeed I think it's not normal.
Will be fixed in this PR once merged : #398

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

No branches or pull requests

4 participants