Board index » cppbuilder » TStringList Count and Critical sections

TStringList Count and Critical sections


2007-03-19 06:52:37 PM
cppbuilder35
Hello,
I have a string list in a thread, and I have to use Critical sections
because I add the strings from another thread. I just would like to know if
i have to use the EnterCriticalSection and LeaveCriticalSection methods when
I call MyStringList->Count as well.
Thanks,
Inés Fernández
 
 

Re:TStringList Count and Critical sections

"Inés Fernández" < XXXX@XXXXX.COM >wrote in message
Quote
I just would like to know if i have to use the EnterCriticalSection
and LeaveCriticalSection methods when I call MyStringList->Count
as well.
Yes. All access to the TSTringList has to be protected.
Gambit