>>>>> On Fri, 02 Mar 2007 13:21:18 +0100, Peter Sylvester said:
> 
> One can omit the SSL_CTX_free but in oder to be clean, someone must call
> it, and this may unfortunately not necessarily be the same instance who 
> created it.

OK, so a less hacky solution using the current APIs would be to do your own
reference counting and only call SSL_CTX_free when your count goes to 0.

__Martin


> 
> >
> > I think you are kind of right, but there's another possibility.
> >
> > Does the other instance call SSL_free as well?  Note that SSL_free also 
> > calls
> > SSL_CTX_free, so I suspect your call to SSL_CTX_free is not needed (except 
> > in
> > by whoever called SSL_CTX_new).  Consider how you would make it work if you
> > had three SSL objects sharing the same SSL_CTX.
> >
> > __Martin
> > ______________________________________________________________________
> > OpenSSL Project                                 http://www.openssl.org
> > Development Mailing List                       [email protected]
> > Automated List Manager                           [EMAIL PROTECTED]
> >
> >
> >   
______________________________________________________________________
OpenSSL Project                                 http://www.openssl.org
Development Mailing List                       [email protected]
Automated List Manager                           [EMAIL PROTECTED]

Reply via email to