mirror of
https://github.com/2dust/v2rayN.git
synced 2025-08-29 14:26:20 +00:00
内存优化 #3632 图形化时内存占用100+,后台运行时内存占用10+
This commit is contained in:
parent
52b84c3201
commit
c2d0d619ac
2 changed files with 6 additions and 2 deletions
|
@ -1,4 +1,5 @@
|
||||||
using System.Windows;
|
using Lierda.WPFHelper;
|
||||||
|
using System.Windows;
|
||||||
using System.Windows.Threading;
|
using System.Windows.Threading;
|
||||||
using v2rayN.Handler;
|
using v2rayN.Handler;
|
||||||
using v2rayN.Mode;
|
using v2rayN.Mode;
|
||||||
|
@ -13,6 +14,7 @@ namespace v2rayN
|
||||||
{
|
{
|
||||||
public static EventWaitHandle ProgramStarted;
|
public static EventWaitHandle ProgramStarted;
|
||||||
private static Config _config;
|
private static Config _config;
|
||||||
|
LierdaCracker lierdaCracker=new LierdaCracker();
|
||||||
|
|
||||||
public App()
|
public App()
|
||||||
{
|
{
|
||||||
|
@ -28,6 +30,7 @@ namespace v2rayN
|
||||||
/// <param name="e"></param>
|
/// <param name="e"></param>
|
||||||
protected override void OnStartup(StartupEventArgs e)
|
protected override void OnStartup(StartupEventArgs e)
|
||||||
{
|
{
|
||||||
|
lierdaCracker.Cracker(30); //内存回收,每30秒回收一次
|
||||||
Global.ExePathKey = Utils.GetMD5(Utils.GetExePath());
|
Global.ExePathKey = Utils.GetMD5(Utils.GetExePath());
|
||||||
|
|
||||||
var rebootas = (e.Args ?? new string[] { }).Any(t => t == Global.RebootAs);
|
var rebootas = (e.Args ?? new string[] { }).Any(t => t == Global.RebootAs);
|
||||||
|
|
|
@ -14,7 +14,8 @@
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
|
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<PackageReference Include="Downloader" Version="3.0.4" />
|
<PackageReference Include="Downloader" Version="3.0.4" />
|
||||||
|
<PackageReference Include="Lierda.WPFHelper" Version="1.0.3" />
|
||||||
<PackageReference Include="MaterialDesignThemes" Version="4.7.1" />
|
<PackageReference Include="MaterialDesignThemes" Version="4.7.1" />
|
||||||
<PackageReference Include="H.NotifyIcon.Wpf" Version="2.0.108" />
|
<PackageReference Include="H.NotifyIcon.Wpf" Version="2.0.108" />
|
||||||
<PackageReference Include="Newtonsoft.Json" Version="13.0.3" />
|
<PackageReference Include="Newtonsoft.Json" Version="13.0.3" />
|
||||||
|
|
Loading…
Reference in a new issue