v0.7.0
As a result function unifex_paylaod_release_ptr
was deleted. Instead, user is responsible for allocating and freeing memory of UnifexPayload
struct on its own. The following listings illustrates proper usage of UnifexPayload
UnifexPayload payload;
unifex_payload_alloc(env, UNIFEX_PAYLOAD_BINARY, len, &payload);
// do something
unifex_payload_release(&payload);
or
UnifexPayload *payload = (UnifexPayload *)unifex_alloc(sizeof(UnifexPayload));
unifex_payload_alloc(env, UNIFEX_PAYLOAD_BINARY, len, payload);
// do something
unifex_payload_release(payload);
unifex_free(payload);