I am using c# wrappers generated by swig and am experiencing strange problems associated with garbage collector/memory management. The code randomly disposes variables (even global variables). I tried using GC.keepAlive() function, from C# but have not found it much helpful. Any kind of hint/help would be appreciated since I have no clue what's happening.
C# wrapper garbage collector problem