I am writing a simple .Net app to query live market levels and append them to a file. I have built on the example given in the tutorial and have something like the below. There are two issues: 1) The data doesn't always get pushed to the file 2) The app steadily increases its use of memory. Help much appreciated.
while (true)
{
DispatcherFrame Frame = new DispatcherFrame();
RICFieldList = getList();
for(pair in RICFieldList)
{
var realtime = DataServices.Instance.Realtime;
IRealtimeSingleDataRequest singleRequest;
singleRequest = realtime.Request(RIC, Field, AppendToFile);
}
Dispatcher.PushFrame(Frame);
Thread.Sleep(60000);
}