What operating system and processor architecture are you using (go env)?
go env Output
$ go env
What did you do?
I've checked a few other projects of mine which in certain cases relies on the same code base, but having some extra operations and I found that this increased memory consumption issue is not happening there, which means that the GC somehow sweeps out effectively the the allocated memory address.
// Substract the image under the detected face region.imgData:=make(byte, scale*scale*4)
subimg:=c.ctx.Call("getImageData", row-scale/2, col-scale/2, scale, scale).Get("data")
This code (line 257-261) practically will "force" the GC to do it's job effectively and deallocate the memory address, which means that the js.CopyBytesToGo function for some reason allocates some memory address which are not garbage collected (maybe because internally are still referenced somewhere).
As for why this would happen internally and how to deal with similar situations ( I believe in certain cases you will somehow need a global go variable), I would like to know golang community's insights.