Skip to content

Commit

Permalink
Destroy bitmap after getting hex.
Browse files Browse the repository at this point in the history
  • Loading branch information
octalmage committed Oct 6, 2015
1 parent fc9df2a commit e0f616a
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/robotjs.cc
Original file line number Diff line number Diff line change
Expand Up @@ -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());

Expand Down

0 comments on commit e0f616a

Please sign in to comment.