> > or i should close all ssl connections based on a ctx before i
> call SSL_CTX_free?
> Yes, you should.

Huh? Why?

What would be the point of having a reference count if you had to get rid of
all other references before you could release your own?

A chunk of code should call SSL_CTX_free as soon as it is done with that
context. It doesn't have to worry about what other code might be using that
same context because that code has its own reference.

SSL_CTX_free is like saying "I am done with this context, and if nobody else
is using it, it can be deleted".

DS


______________________________________________________________________
OpenSSL Project                                 http://www.openssl.org
User Support Mailing List                    openssl-users@openssl.org
Automated List Manager                           [EMAIL PROTECTED]

Reply via email to