Autor Beitrag
bawa
ontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic star
Beiträge: 49



BeitragVerfasst: Sa 24.11.07 14:19 
Heyho,
ist es möglich in einer TStringList (bzw. Listbox) ohne großen aufwand den arbeitsspeicher, den sie durch ihre daten beansprucht zu ermitteln?
d.h.: ich habe eine listbox in die pro sek. 3 daten eingetragen werden und ich will, dass diese daten gespeichert werden sobald sagen wir mal 4 mb zusammen gekommen sind

Schonmal danke für eure antworten
BenBE
ontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic star
Beiträge: 8721
Erhaltene Danke: 191

Win95, Win98SE, Win2K, WinXP
D1S, D3S, D4S, D5E, D6E, D7E, D9PE, D10E, D12P, DXEP, L0.9\FPC2.0
BeitragVerfasst: Sa 24.11.07 14:30 
Du kannst über InstanceSize die Instanz-Datengröße ermitteln (Scheint aber nie wirklich hinzuhauen ...) oder du liest einfach Length(TStringList.Text) aus und nimmst den Wert. Das kann aber bei recht vielen Einträgen in der Listbox extrem Performance-Bremsend sein.

_________________
Anyone who is capable of being elected president should on no account be allowed to do the job.
Ich code EdgeMonkey - In dubio pro Setting.