GCHandle objHandle = GCHandle.Alloc(Globals.Instance.BlackBoard, GCHandleType.WeakTrackResurrection);
int address = GCHandle.ToIntPtr(objHandle).ToInt32();

Object obj = GCHandle.FromIntPtr(new IntPtr(address)).Target;

objHandle.Free();

还可以配合Marshal使用
Marshal

相关文章:

  • 2022-12-23
  • 2022-12-23
  • 2021-11-18
  • 2022-02-05
  • 2022-12-23
  • 2021-07-10
  • 2022-12-23
猜你喜欢
  • 2022-12-23
  • 2021-07-30
  • 2022-02-12
  • 2021-12-27
  • 2022-12-23
相关资源
相似解决方案