Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Does making a View invisible clears memory?

I have a custom View which I draw on bitmaps in the onDraw function.

if I set View to be invisible through View.setVisibility(View.GONE), it clears all the memory

of the allocated bitmaps?

like image 357
piojo Avatar asked Apr 10 '26 05:04

piojo


1 Answers

No, it does not. You would have to call recycle on the bitmaps to release the memory.

like image 167
Chris Avatar answered Apr 11 '26 20:04

Chris



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!