Skip to content

v0.7.0

Compare
Choose a tag to compare
@mickel8 mickel8 released this 02 Sep 09:57
· 160 commits to master since this release
  • implement thread API for C node (#81)
  • change UnifexPayload API (also #81)

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);