Avoid heap corruption of surface view.