From a1eef112d6406d45d230b1f48c84938dcd652709 Mon Sep 17 00:00:00 2001 From: benpurdy Date: Mon, 9 Apr 2018 19:57:17 -0700 Subject: [PATCH] fix(windows): Reset Buffer after write operations are complete to free memory (#1547) --- src/serialport_win.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/src/serialport_win.cpp b/src/serialport_win.cpp index c620130be..24247478b 100644 --- a/src/serialport_win.cpp +++ b/src/serialport_win.cpp @@ -388,6 +388,7 @@ void EIO_AfterWrite(uv_async_t* req) { argv[0] = Nan::Null(); } baton->callback.Call(1, argv); + baton->buffer.Reset(); delete baton; }