Algunas de las rutinas que en algún momento me han sido de gran utilidad ... ahí os las dejo ...
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:
Enviar comentarios (Atom)
No hay comentarios:
Publicar un comentario