@@ -0,0 +1,9 @@
+// +build go1.7
+
+package main
+import "runtime"
+func keepAlive(i interface{}) {
+ runtime.KeepAlive(i)
+}
@@ -0,0 +1,7 @@
+// +build !go1.7
+ // Dummy function. Do nothing
@@ -160,7 +160,7 @@ func calcCrop(width, height int, po processingOptions) (left, top int) {
}
func processImage(data []byte, imgtype imageType, po processingOptions) ([]byte, error) {
- defer runtime.KeepAlive(data)
+ defer keepAlive(data)
err := C.int(0)