Dispose() public method

Releases all resources used by the RemoteAllocation object.
Don't use the IDisposable pattern because the class is sealed.
public Dispose ( ) : void
return void
Example #1
0
 /// <summary>
 /// Deallocates a region of memory previously allocated within the virtual address space of the remote process.
 /// </summary>
 /// <param name="allocation">The allocated memory to release.</param>
 public void Deallocate(RemoteAllocation allocation)
 {
     // Dispose the element
     if(!allocation.IsDisposed)
         allocation.Dispose();
     // Remove the element from the allocated memory list
     if (InternalRemoteAllocations.Contains(allocation))
         InternalRemoteAllocations.Remove(allocation);
 }
Example #2
0
 /// <summary>
 ///     Deallocates a region of memory previously allocated within the virtual address space of the remote process.
 /// </summary>
 /// <param name="allocation">The allocated memory to release.</param>
 public void Deallocate(RemoteAllocation allocation)
 {
     // Dispose the element
     if (!allocation.IsDisposed)
     {
         allocation.Dispose();
     }
     // Remove the element from the allocated memory list
     if (InternalRemoteAllocations.Contains(allocation))
     {
         InternalRemoteAllocations.Remove(allocation);
     }
 }