free surface buffers before trying to allocate new ones, so we have more chance of success
1 file changed