public virtual void Dispose()
{
// Release all injected modules which must be disposed
foreach (var injectedModule in InternalInjectedModules.Where(m => m.MustBeDisposed))
{
injectedModule.Dispose();
}
// Clean the cached functions related to this process
foreach (var cachedFunction in RemoteModule.CachedFunctions.ToArray())
{
if (cachedFunction.Key.Item2 == MemorySharp.Handle)
RemoteModule.CachedFunctions.Remove(cachedFunction);
}
// Avoid the finalizer
GC.SuppressFinalize(this);
}