示例#1
0
 public unsafe void Dispose()
 {
     while (_blocks.Count != 0)
     {
         MarshalUtil.FreeMemory(_blocks[_blocks.Count - 1].Data);
         _blocks.RemoveAt(_blocks.Count - 1);
     }
     _imports.Clear();
     _relocations.Clear();
     _blocks.Clear();
     _stack.Clear();
 }
示例#2
0
文件: Chunk.cs 项目: Qibbi/Builder
 public void Dispose()
 {
     if (InstanceBuffer != IntPtr.Zero)
     {
         MarshalUtil.FreeMemory(InstanceBuffer);
         InstanceBuffer = IntPtr.Zero;
     }
     if (RelocationBuffer != IntPtr.Zero)
     {
         MarshalUtil.FreeMemory(RelocationBuffer);
         RelocationBuffer = IntPtr.Zero;
     }
     if (ImportsBuffer != IntPtr.Zero)
     {
         MarshalUtil.FreeMemory(ImportsBuffer);
         ImportsBuffer = IntPtr.Zero;
     }
 }