autdel the grails buffer when closed