I copied the code from the Send Simple email and I get a AV after the send, to wit:
var mailman: TChilkatMailMan2; success: Integer; email: CHILKATMAILLib2_TLB.IChilkatEmail2;What's the proper method to free the object ? Does CloseSMTPConnection tidy everything up ? I used the cast because the IChilkatEmail2 doesn't have a free method.
asked Apr 04 '13 at 09:56
A Chilkat interface reference would be a type that begins with an uppercase "I", such as IChilkatEmail2. You don't explicitly call _AddRef or _Release -- this is handled automatically be Delphi. In other words, you don't actually need to do anything in your application code to cleanup.
When a Chilkat object is declared using “TChilkat*” such as TChilkatSFtp, and it is instantiated dynamically, then it must be explicitly freed (destroyed). See Cleaning up ActiveX Objects in Delphi — calling Free
answered Apr 04 '13 at 10:03