fix(resize): runtime.KeepAlive is only Go

This commit is contained in:
Tomas Aparicio 2017-08-03 20:40:56 +02:00
parent 98c931eb89
commit bac8e42eae

View file

@ -9,14 +9,12 @@ import "C"
import (
"errors"
"math"
"runtime"
)
// Resize is used to transform a given image as byte buffer
// with the passed options.
func Resize(buf []byte, o Options) ([]byte, error) {
defer C.vips_thread_shutdown()
defer runtime.KeepAlive(buf)
image, imageType, err := loadImage(buf)
if err != nil {