Btw, call SDL_GLES_Quit() (~ equivalent to eglTerminate()) before SDL_Quit(). The N8x0 leaks _a lot_ without such a call, but the N900 EGL driver seems to be more robust in this regard (so this won't improve the N900 situation).