Re: TidAttachment

Giganews Newsgroups
Subject: Re: TidAttachment
Posted by:  Don (blacknapk…@twistandfruge.com)
Date: Fri, 4 Nov 2005

> I am using Tidatachment to creat my attachments.
> In my application I send out alot of emails in a day.
> Im concerned  I am crating an object without clearing
> memory and will eventually choke and die.
> Is there a way to clear this object once Im finished.
> I noticed  "TidAttachment.Newinstance.Free".
> Will this do it???

In Indy10, the attachment is owned by the message parts collection.  You can
use the TIdAttachment.Free method if you're creating a message part with a
nil collection as the owner.  If it's created with a TIdMessage.MessageParts
collection as the owner, it's an owned object that's automatically
cleared/freed when the collection is cleared/freed.

hth...

Replies

In response to

TidAttachment posted by DAVE on Fri, 4 Nov 2005