fixed pointer bug in flush(); implemented dtor; fixed memory leak in read(); minor change in read() for _head/_tail handling consistency --KW