I am getting OutOfMemory Exception in my .net addin. The addin is using large number of managed and unmanaged objects. Is there a way to trap this exception?
Updated: I think any application can get an OutofMemory exception if it processess a large amount of data that needs to be processed and not freed periodically. Suppose I have a method that analyses some structures in memory. I give it 300 structures, it loads each of them in memory, analyses them and completes processing. In this operation the memory usage was X. Now if I give it 3000 structures to process, it is going to analyze those 3000 in memory and the memory usage will go to 10X.
Updated
This problem is only seen in Excel 2007 and not in Excel 2003 which I why I have asked a MSDN personnel to look into it.