0

Need some expert advice:

I have an unmanaged code from a 3rd party provider which is on C/C++ and I am writing a wrapper from C#.Net to get referred and use the respective methods. Since its unmanaged and there is a lot of places which has the memory leak and unmanaged code is not known to manage the memory what is the best solution for this kind of scenario?

I have the solution with PInvoke and Marshalling which bridges the Managed and Unmanaged with a knowledge of taking the memory management. But will GC takes care of this completely or is there still a gap which the memory should be released? Is there a solution from the .Net wrapper class i have a generic way to manage the memory for the unmanaged calls?

Niall
  • 30,036
  • 10
  • 99
  • 142

0 Answers0