Switches default array allocation policy to amortize reallocation time in loops with appends.
Widget::graphics returns shared<Graphics> to avoid copies.