Hi!
I find it confusing that RenderTarget::SetView(const View& view);
stores a pointer to view, instead of copying it.
Thus I have to keep the View object around to keep the pointer valid:
void canvas::resize(int width, int height) {
static sf::View view;
sf::FloatRect canvasRect(0, 0, width, height);
view.SetFromRect(canvasRect);
SetView(view);
}