I wrote a small .NET add in to excel 2007 that read data from external c++ api and display it inside an excel.
The task manager shows that I'm having a memory leak (the memory usage is inflate linearly up to 250MB after whitch it throws an "Excel cannot complete this task with available resources error") but the problem disappears as soon as I minimize the excel window. The api uses delegates to return data and I update it into a dictionary. another thread is updating the excel from the dictionary every second.It is unlikely that the unmanaged code is responsible of the leak.
Does anybody have an idea what can ca开发者_JAVA技巧use this?
10x!
I've found the problem. I was updating the cells by setting the Formula property whitch is taking more time. The excel didn't managed to complite all the updates on time and the stack grow. After I changed the way I update the cells to set_value it became OK.
Thanks to all.
精彩评论