We are currently creating a Paint object every time we draw something, and all of those instances must be garbage collected. Also, it's slow to set all the parameters everytime we do anything. This is why we should have a AndroidPaint class for AndroidContext, which keeps a single copy of the Paint object.
We are currently creating a Paint object every time we draw something, and all of those instances must be garbage collected. Also, it's slow to set all the parameters everytime we do anything. This is why we should have a AndroidPaint class for AndroidContext, which keeps a single copy of the Paint object.