Canvas is used by DrawColor(called once), DrawLine(called 7 times), DrawRect(called 10 times), and DrawText (called 16 times).
I thought the RunStaticMethod might be calling garbage collection because of the"gc". Not sure I see how it creates a bitmap. The "What does this code do?" was not referring to the stack trace but the code someone listed to prevent the outofmemory error.
I know the createBitmap in the stack trace creates a bitmap I just don't understand why it is creating three of them. You only need one for the canvas, right?