From e0f616a01cb1821d54f0a2f5dfbf5edd52885082 Mon Sep 17 00:00:00 2001 From: Jason Stallings Date: Tue, 6 Oct 2015 12:28:45 -0500 Subject: [PATCH] Destroy bitmap after getting hex. --- src/robotjs.cc | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/robotjs.cc b/src/robotjs.cc index bd2598bd..4e79a3b6 100644 --- a/src/robotjs.cc +++ b/src/robotjs.cc @@ -662,10 +662,11 @@ NAN_METHOD(getColor) color = MMRGBHexAtPoint(bitmap, x, y); - //destroyMMBitmap(bitmap); char hex[7]; padHex(color, hex); + + destroyMMBitmap(bitmap); info.GetReturnValue().Set(Nan::New(hex).ToLocalChecked());