I have a set of managed dll's that work fine as a managed standalone program. But, I'm trying to use them from an un-managed application. When I do, once I've returned from calling my managed functions, if I wait a while, the program will crash with "access violation attempted to read or write protected memory". I have a messagebox that pops up with some information about a returned value. If I just sit there with the message box displayed, after a few seconds the exception will happen, so I guess this points to garbage collection.
After the exception, there is no information about where this is happening. Any ideas about tracking this down, or preventing it, or ignoring it?