Flush automatically on dispose
Added getvalue