mirror of
https://github.com/go-vgo/robotgo.git
synced 2025-06-02 23:23:55 +00:00
automatic free internal bitmap
This commit is contained in:
parent
496045e5d0
commit
44a2fc533b
@ -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)
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
Loading…
Reference in New Issue
Block a user