I have a question regarding the usage of the C Libraries:
In which cases do I have to explicitly dispose a Chilkat object? My current example are the ZIP Libs, but the basic question matters for the whole library:
How is this to be treated with objects handles returned by the API itself, for example with CkZip_FirstEntry?
I assume that I get some reference to an existing object within the ZIP Object in question. So on one hand I assume, that I must not dispose it. This would be in accordance with the documentation, since I did not explicitly create the data structure in question.
However, I believe that I am experiencing a memory leak at exactly that call, which vanishes if I add a CkZipEntry_Dispose after getting and using the FirstEntry handle.
asked Apr 29 '13 at 08:44
Any object handle returned by a Chilkat "C" function must also be explicitly freed by the application by calling the appropriate "_Dispose" function.
// Get the number of files and directories in the .zip n = CkZip_getNumEntries(zip); printf("%dn",n);
answered Apr 29 '13 at 08:46