I wrote below code to obtain stream from canvas. But after every 5 minutes. I am getting (out of memory). I looked "Profiler" in android studio to check memory consump