Algunas de las rutinas que en algún momento me han sido de gran utilidad ... ahí os las dejo ...
Mostrando entradas con la etiqueta LIBERAR MEMORIA. Mostrar todas las entradas
Mostrando entradas con la etiqueta LIBERAR MEMORIA. Mostrar todas las entradas
LIBERAR MEMORIA
<DllImport("KERNEL32.DLL", EntryPoint:="SetProcessWorkingSetSize", SetLastError:=True, CallingConvention:=CallingConvention.StdCall)>
Function SetProcessWorkingSetSize(pProcess As IntPtr, dwMinimumWorkingSetSize As Integer, dwMaximumWorkingSetSize As Integer) As Boolean
End Function
<DllImport("KERNEL32.DLL", EntryPoint:="GetCurrentProcess", SetLastError:=True, CallingConvention:=CallingConvention.StdCall)>
Function GetCurrentProcess() As IntPtr
End Function
'Funcion de liberacion de memoria
Public Sub ClearMemory()
Dim pHandle As IntPtr = GetCurrentProcess()
SetProcessWorkingSetSize(pHandle, -1, -1)
End Sub
Suscribirse a:
Entradas (Atom)