【发布时间】:2014-03-19 14:55:09
【问题描述】:
所以我正在使用 C# 包装器到 C++ 库,并尝试添加另一个函数。我已经在 C# 中创建了函数声明并且它正在工作。但它只工作一次。当我第二次尝试运行它时,程序挂起。
互操作定义和声明位于https://github.com/joshglenn/interception-cs/blob/master/kchordr/Program.cs
我运行的代码在这里:https://github.com/joshglenn/interception-cs/blob/master/kchordr/InterceptionDemoForm.cs
第一次运行良好但在第二次启动时挂起的函数是 GetHardwareID()。
我的问题是,我该如何解决这个问题?这似乎是内存泄漏?
【问题讨论】:
标签: c# c++ interop language-interoperability