gpgme_data_release destroys the data object with
the handle dh. It releases all associated resources that were
not provided by the user in the first place.
gpgme_data_release_and_get_mem is like
gpgme_data_release, except that it returns the data buffer and
its length that was provided by the object.
The user has to release the buffer with
gpgme_free. In case
the user provided the data buffer in non-copy mode, a copy will be
made for this purpose.
In case an error returns, or there is no suitable data buffer that can
be returned to the user, the function will return
NULL. In any
case, the data object dh is destroyed.
gpgme_free releases the memory returned by
gpgme_pubkey_algo_string. It should be used instead of the
free function in case different allocators are
used by a program. This is often the case if gpgme is used under
Windows as a DLL.