Skip to content

Commit

Permalink
Add more runtime.KeepAlive calls to ImageBuf
Browse files Browse the repository at this point in the history
  • Loading branch information
justinfx committed Jan 9, 2018
1 parent 125aec3 commit f64de34
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions imagebuf.go
Expand Up @@ -197,6 +197,7 @@ func (i *ImageBuf) ReadFormatCallback(force bool, convert TypeDesc, progress *Pr
if !bool(ok) {
return i.LastError()
}
runtime.KeepAlive(i)

return nil
}
Expand Down Expand Up @@ -233,6 +234,7 @@ func (i *ImageBuf) WriteFileProgress(filepath, fileformat string, progress *Prog
if !bool(ok) {
return i.LastError()
}
runtime.KeepAlive(i)

return nil
}
Expand Down Expand Up @@ -426,6 +428,7 @@ func (i *ImageBuf) GetFloatPixels() ([]float32, error) {
if !ok {
return nil, i.LastError()
}
runtime.KeepAlive(i)

return pixels, nil
}
Expand Down Expand Up @@ -477,6 +480,7 @@ func (i *ImageBuf) GetPixels(format TypeDesc) (interface{}, error) {
if !ok {
return nil, i.LastError()
}
runtime.KeepAlive(i)

return pixel_iface, nil
}
Expand Down

0 comments on commit f64de34

Please sign in to comment.