diff --git a/robotgo.go b/robotgo.go index df3a688..69a94bd 100644 --- a/robotgo.go +++ b/robotgo.go @@ -291,6 +291,7 @@ func GoCaptureScreen(args ...int) Bitmap { } else { bit = CaptureScreen() } + defer FreeBitmap(bit) return ToBitmap(bit) } @@ -312,6 +313,7 @@ func SaveCapture(spath string, args ...int) { } SaveBitmap(bit, spath) + FreeBitmap(bit) } /*