Sign in Join

Live chat for Free Pascal, Lazarus, Delphi and every Pascal programmer.

Mailing lists / fpc-pascal / 2008-01

TStringList

2 messages · 2 people ·

Reply by email Subscribe to this list Your subscription

Read-only archive. Use j and k to move between messages.

Damien Gerard

I often use TObjectLis, which is able to destroy by itself objects in its list.
However, is it the same with a TStringList when an object is added with AddObject ?

I mean when the method .Clear or Delete are called, is my associated object is destroyed in the same time ?
I suppose there is not the case due to there is not the property OwnObject as in a TObjectList.

Damien Gerard Le temps n'a pas d'importance. Seul le code est important -- (f00ty)
Michael Van Canneyt
to Damien Gerard
Damien Gerard wrote 5 lines
I often use TObjectLis, which is able to destroy by itself objects in its list. However, is it the same with a TStringList when an object is added with AddObject ?

No.

I mean when the method .Clear or Delete are called, is my associated object is destroyed in the same time ?

No.

I suppose there is not the case due to there is not the property OwnObject as in a TObjectList.

Exactly.

Michael.