A tutorial on how you can clear your application memory cache, so it can run faster, and lower the CPU usage.
Go to http://afaomax.krylic.net for more tutorials.
You can download the source code for this application at:
http://afaomax.krylic.net/source/clea...
The code used in the program:
Declaration:
Declare Function SetProcessWorkingSetSize Lib "kernel32.dll" (ByVal process As IntPtr, ByVal minimumWorkingSetSize As Integer, ByVal maximumWorkingSetSize As Integer) As Integer
Flush Code:
Public Sub FlushMemory()
Try
GC.Collect()
GC.WaitForPendingFinalizers()
If (Environment.OSVersion.Platform = PlatformID.Win32NT) Then
SetProcessWorkingSetSize(Process.GetCurrentProcess().Handle, -1, -1)
Dim myProcesses As Process() = Process.GetProcessesByName("ApplicationName")
Dim myProcess As Process
'Dim ProcessInfo As Process
For Each myProcess In myProcesses
SetProcessWorkingSetSize(myProcess.Handle, -1, -1)
Next myProcess
End If
Catch ex As Exception
End Try
End Sub
Auf dieser Seite können Sie das Online-Video Visual Basic Tutorial: Clear the memory Cache mit der Dauer stunde minuten sekunde in guter Qualität ansehen, das der Benutzer AfaoMAX 06 Februar 2010 hochgeladen hat, den Link mit Freunden und Bekannten teilen, dieses Video wurde auf Youtube bereits 43,729 Mal angesehen und es wurde von 129 den Zuschauern gefallen. Viel Spaß beim Betrachtenden Zuschauern gefallen!