When doing the following:
Is it necessary to "dispose" pCert when done with it? Or does the CkSocket now own it and will dispose pCert for me?
Do ChilKat objects have reference counts with AddRef/Release like methods?
Signed 'Dazed and Confused'
asked Apr 09 '13 at 17:57
The code snippet you provided above is incorrect. In the Chilkat "C" API, C++ objects (such as "CkCert") are not used. The "C" function you mentioned actually looks like this:
HCkCert CkCertStore_FindCertBySubject(HCkCertStore cHandle, const char *subject)
The "C" language does not use object. Therefore, the object-oriented API uses handles to opaque objects. Any handle returned from a Chilkat "C" function, such as an HCkCert, must be disposed by using the corresponding dispose function for that object. For example:
HCkCert hCert = CkCertStore_FindCertBySubject(certStore,"Chilkat Software, Inc."); ... CkCert_Dispose(hCert);
answered Apr 09 '13 at 18:24