Implement IEDBuffer_close, and use it in the demo