Destroy egl to avoid memory issue