What control is best to use when reporting events to a windows form, I have an application in VB.Net that generates about 5000/6000 events per hr, these events are logged to an sql server, But I wanted to have the last 100 or so events listed in a listbox or whatever just so a user could see what's going on, only thing is when I do this I can see the memeory go up and up...I used a listbox control, and check items.count when >100 I clear list box and write new events. Any ideas how to be able to report such amounts of data ( strings ) to a GUI with out exesive memory usage. I don't think this will anwer your question... You should not use taskman.exe to check how much mem a .net app uses ,Windows App ( light weight process reporting to GUI)
question is also when I clear the list items are they really dumped or do I have to explcitly call the GC object?
regards in advance PaulSv: Windows App ( light weight process reporting to GUI)
but i thought that instead of clearing the listbox you could just remove the oldest element (Index = 0) and add the new one at the end of the list (assuming you don't have a sorted list), instead of clearing the list once a minute.Sv: Windows App ( light weight process reporting to GUI)
use a .net mem profiler like the one from swedish scitech http://www.scitech.se/
when you clear your listbox the objects are marked as dead , but this doesnt mean they are instantly removed. this will be done when the GC thinks it needs the memory for something else.
//Roger