Next: Manipulating Data Buffers, Previous: Creating Data Buffers, Up: Exchanging Data
The function
gpgme_data_releasedestroys the data object with the handle dh. It releases all associated resources that were not provided by the user in the first place.
The function
gpgme_data_release_and_get_memis likegpgme_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.