Skip to content

Conversation

dreampiggy
Copy link
Collaborator

See #11

This only happened on real iPhone device but not simulator.

This is because of the wrong implementation of #10 .

heif_image_release, will do a free call to the bitmap buffer. At that time I only test the iPhone Simulator, but not real device. So I found it's OK.

However, the better solution, it's to use the CGDataProviderCreateWithData the info arg. We need to pass the heif_image opaque pointer, and then using the API to release the bitmap buffer. So this always correct.

…before CGImage dealloc and cause crash. This only happened on real iPhone device but not simulator
@dreampiggy dreampiggy added the fix label Jun 2, 2019
@dreampiggy dreampiggy merged commit 63f968a into master Jun 2, 2019
@dreampiggy dreampiggy deleted the Bugfix_buffer_free_on_real_device_crash branch June 2, 2019 12:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

1 participant