libheif:go-free

Last commit made on 2018-09-12
Get this branch:
git clone -b go-free https://git.launchpad.net/libheif

Branch merges

Branch information

Name:
go-free
Repository:
lp:libheif

Recent commits

e210a66... by Leon Klingele <email address hidden>

go: Delegate responsibility to free C-allocated memory to caller

This fixes an issue where struct members were passed to external C
functions after which the struct was no longer referenced.
As described in the docs of runtime.SetFinalizer, this would allow
the Go garbage collector to run every finalizer associated with the
struct (as it will no longer be used). Unfortunately, as we bound
a finalizer to free every C-allocated struct member, those
finalizers were run, freeing the struct members too early.

This patch currently requires the caller to manually call .Free()
on the following structs once they are no longer required:
- Context
- ImageHandle
- DecodingOptions
- Image

Such structs are currently returned by the following functions:
- NewContext
- NewDecodingOptions
- NewImage
- Context.GetPrimaryImageHandle
- Context.GetImageHandle
- ImageHandle.GetDepthImageHandle
- ImageHandle.GetThumbnail
- ImageHandle.DecodeImage
- Image.ScaleImage

41ec47d... by Joachim Bauch

Don't scale image if size is zero.

52e204f... by Joachim Bauch

Integrate Coverity Scan in Travis.

6f56588... by Joachim Bauch

Initialize members.

Found by Coverity Scan.

7616230... by Joachim Bauch

Only allocate profile data if size non-zero, fixes leak on releasing pointer.

Found by Coverity Scan.

0592b03... by Joachim Bauch

Reduce scope of variable only used inside loop.

6e0c9c9... by Joachim Bauch

Handle case where input height is 0.

Found by Coverity Scan.

c56cd04... by Dirk Farin

remove double boolean term (issue #77)

3245495... by Joachim Bauch

Make sure "image" is initialized to prevent error on releasing.

30eb8df... by Joachim Bauch

Merge pull request #64 from strukturag/goify2

Various improvements to the updated Go library and example app