On Wed, Jun 18, 2008, Gerhard Gappmeier wrote:

> Hi
>
> some functions like X509_PUBKEY_get increment the internal reference 
> counter of the "object"
> so that EVP_PKEY_free( pKey ) has to be called.
>
> Other functions like X509_get_X509_PUBKEY just return an internal pointer
> and I have to care myself about reference counting.
>
> Is there a general rule or naming convention to know how to use that?
> Or is the only possibilty to figure that out debugging into the code?
>

If the function has a '1' in the name it ups the reference count. If it has a
'0' it doesn't.

Unfortunately there are quiet a few functions around which existed before this
convention was decided on which can do either :-( 

Steve.
--
Dr Stephen N. Henson. Email, S/MIME and PGP keys: see homepage
OpenSSL project core developer and freelance consultant.
Homepage: http://www.drh-consultancy.demon.co.uk
______________________________________________________________________
OpenSSL Project                                 http://www.openssl.org
User Support Mailing List                    openssl-users@openssl.org
Automated List Manager                           [EMAIL PROTECTED]

Reply via email to