From 5f15796e6d077a137f1a4be6dd351c7b26b23655 Mon Sep 17 00:00:00 2001 From: Alex Gassner Date: Wed, 16 Apr 2025 15:22:46 +0200 Subject: [PATCH 1/2] Update node_printer_win.cc --- src/node_printer_win.cc | 1 + 1 file changed, 1 insertion(+) diff --git a/src/node_printer_win.cc b/src/node_printer_win.cc index e2b6ac31..71030f50 100644 --- a/src/node_printer_win.cc +++ b/src/node_printer_win.cc @@ -22,6 +22,7 @@ namespace{ */ template class MemValue: public MemValueBase { + Type* _value; public: /** Constructor of allocating iSizeKbytes bytes memory; * @param iSizeKbytes size in bytes of required allocating memory From f31051766f98c38ce9759e007565c0c491866a50 Mon Sep 17 00:00:00 2001 From: Alex Gassner Date: Wed, 16 Apr 2025 16:17:29 +0200 Subject: [PATCH 2/2] Update node_printer_win.cc --- src/node_printer_win.cc | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/src/node_printer_win.cc b/src/node_printer_win.cc index 71030f50..8378c328 100644 --- a/src/node_printer_win.cc +++ b/src/node_printer_win.cc @@ -22,13 +22,12 @@ namespace{ */ template class MemValue: public MemValueBase { - Type* _value; public: /** Constructor of allocating iSizeKbytes bytes memory; * @param iSizeKbytes size in bytes of required allocating memory */ MemValue(const DWORD iSizeKbytes) { - _value = (Type*)malloc(iSizeKbytes); + this->_value = (Type*)malloc(iSizeKbytes); } ~MemValue () { @@ -36,10 +35,10 @@ namespace{ } protected: virtual void free() { - if(_value != NULL) + if(this->_value != NULL) { - ::free(_value); - _value = NULL; + ::free(this->_value); + this->_value = NULL; } } };