Re: Newbie question about release, freeAndNil, etc
- From: "Maarten Wiltink" <maarten@xxxxxxxxxxxxxxxxxx>
- Date: Sun, 28 Aug 2005 22:26:27 +0200
"e.p" <e.p@xxxxxxxxxxxxxxx> wrote in message
news:430EE35C.31473303@xxxxxxxxxxxxxxxxxx
> Maarten Wiltink wrote:
>> The forms should preferably register and unregister themselves
>> with this list from the constructor and destructor, and be
>> free-on-close so you don't go nuts juggling them. Basically,
>> the single variable is replaced by a collection.
>
> Does TCollection have some code that has that kind of free-on-close
> property for Forms, or what is all that? I have never used
> TCollections, I wonder if someone has code snippets how to use it
> with Forms.
No, sorry. That was just a poor choice of words on my part.
TCollection has nothing to do with this. You _can't_ even use it
because you'd have to derive your forms from TCollectionItem,
and they already have to be derived from TCustomForm[0].
Stick with the word "list", that's the usual implementation.
Groetjes,
Maarten Wiltink
[0] Directly or indirectly. TForm is more often used.
.
- References:
- Newbie question about release, freeAndNil, etc
- From: swansnow
- Re: Newbie question about release, freeAndNil, etc
- From: Maarten Wiltink
- Re: Newbie question about release, freeAndNil, etc
- From: e.p
- Newbie question about release, freeAndNil, etc
- Prev by Date: Re: Proportional scrollbars
- Next by Date: Re: terminal services compatibility
- Previous by thread: Re: Newbie question about release, freeAndNil, etc
- Next by thread: Mapping DLL procedure to Delphi
- Index(es):