Page MenuHome GnuPG

The ref and unref operation is confusing while using gpg_key_t and gpg_xxx_result_t
Closed, WontfixPublic


gpg_xxx_result_t will be unref once when ctx is releasing. If the user manually unref before then, there will be an invalid heap memory. However, after reading the source code, I found that the release of gpgme key_t seems to not be done when ctx is releasing, which requires the user to manually unref.
The management of these two objects is somewhat different, but the description of this in the document is almost the same.



Event Timeline

werner claimed this task.
werner added a subscriber: werner.

gpgme_key_t is a different kind of object than a gpgme_foo_result_t and thus has different properties.