automatic free internal bitmap

This commit is contained in:
vcaesar 2018-07-28 23:32:43 +08:00
parent 496045e5d0
commit 44a2fc533b

View File

@ -291,6 +291,7 @@ func GoCaptureScreen(args ...int) Bitmap {
} else { } else {
bit = CaptureScreen() bit = CaptureScreen()
} }
defer FreeBitmap(bit)
return ToBitmap(bit) return ToBitmap(bit)
} }
@ -312,6 +313,7 @@ func SaveCapture(spath string, args ...int) {
} }
SaveBitmap(bit, spath) SaveBitmap(bit, spath)
FreeBitmap(bit)
} }
/* /*