zoukankan      html  css  js  c++  java
  • 使用WebBrowser,内存一直增加的解决办法

    -- in class definition 

            [DllImport("KERNEL32.DLL", EntryPoint = "SetProcessWorkingSetSize", SetLastError = true, CallingConvention = CallingConvention.StdCall)]
            internal static extern bool SetProcessWorkingSetSize(IntPtr pProcess, int dwMinimumWorkingSetSize, int dwMaximumWorkingSetSize);

            [DllImport("KERNEL32.DLL", EntryPoint = "GetCurrentProcess", SetLastError = true, CallingConvention = CallingConvention.StdCall)]
            internal static extern IntPtr GetCurrentProcess();

    -- code to call when you want to reduce the memory

                IntPtr pHandle = GetCurrentProcess();
                SetProcessWorkingSetSize(pHandle, -1, -1);

  • 相关阅读:
    体温登记APP总结
    体温登记day4
    体温登记day3
    寒期周总结五
    体温登记day2
    体温登记day1
    家庭记账本day7
    家庭记账本day6
    家庭记账本day5
    家庭记账本day4
  • 原文地址:https://www.cnblogs.com/simadi/p/4271652.html
Copyright © 2011-2022 走看看