If fixed, the database access pattern should not be a problem, and the way you had it before looks problematic to me.
Maybe there are some more instances of similar problems, or I’m not seeing all the code (for example – where is dbHolidays declared?).
The Access database engine would do some internal caching, though that should not grow without bounds. Especially if you’re not making multiple instances of the “DBEngine” and database all the time.
Also Excel caches strings internally, so that often looks like a memory leak but should not grow out of bounds.
You can isolate things a bit by changing the implementation of the database access function to just return some fixed or random value, and seeing how that affects your memory usage.
I’m guessing there is also another part that is managing or triggering the recalculation, and your problem might be there.
I’m also happy to arrange for some private support to dig in further.
If you’re interested you are welcome to contact me directly.
You received this message because you are subscribed to the Google Groups "Excel-DNA" group.
To unsubscribe from this group and stop receiving emails from it, send an email to exceldna+u...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/exceldna/6c78f87e-f655-4af4-963e-a46b529a24adn%40googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/exceldna/181a10e6-cfd2-4547-8ecb-78bedd8cc538n%40googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/exceldna/CANW0d4yTKJh%2BQ_v_R65WU8WYU%3DVjKfJaMeZGepg6Z0pUAzw3Kw%40mail.gmail.com.