From da52c467cc67cdb92da80f67eb2eff42916bcb6e Mon Sep 17 00:00:00 2001 From: Crimson Date: Tue, 18 Jun 2024 23:08:53 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BD=BF=E7=94=A8=E5=9E=83=E5=9C=BE=E5=9B=9E?= =?UTF-8?q?=E6=94=B6=E6=9B=BF=E4=BB=A3=E5=86=85=E5=AD=98=E5=9B=9E=E6=94=B6?= =?UTF-8?q?api?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- main.aardio | 20 +++++++------------- 1 file changed, 7 insertions(+), 13 deletions(-) diff --git a/main.aardio b/main.aardio index 4cc208e..04ca1cf 100644 --- a/main.aardio +++ b/main.aardio @@ -20,11 +20,9 @@ plus={cls="plus";left=0;top=0;right=1400;bottom=36;bgcolor=16777215;border={left //整理内存 import process; import raw; -EmptyWorkingSet := ::Psapi.api("EmptyWorkingSet","bool(pointer hanld)") mainForm.release = function(){ - var hanld = process.OpenProcess(0x1f0fff,false,process.getId()) - EmptyWorkingSet(hanld) - raw.closehandle(hanld) + collectgarbage("collect"); + collectgarbage("collect"); } var frmChild = mainForm.loadForm("\dlg\searchForm.aardio"); @@ -64,7 +62,6 @@ showUnmodifyStyle(); //menu-新建 g_teMenus.newFile = function(ctrl){ return function(){ - mainForm.release(); var curRow = mainForm.g_flexcell.ActiveCell().Row; var curCol = mainForm.g_flexcell.ActiveCell().Col; mainForm.g_flexcell.FrozenRows = 0; @@ -74,6 +71,7 @@ g_teMenus.newFile = function(ctrl){ mainForm.g_flexcell.clear(); teUtils.initFlexCellShow(mainForm.g_flexcell); showUnmodifyStyle(); + mainForm.release(); } } @@ -307,15 +305,13 @@ mainForm.popmenuLeft.add('向上插入一行',function(id){ var curSelection = mainForm.g_flexcell.selection(); teUtils.insertFlexCellNewRow(mainForm.g_flexcell, curSelection.FirstRow, 1, mainForm.g_flexcell.colCount); curSelection.release(); - collectgarbage("collect"); - collectgarbage("collect"); + mainForm.release(); } ) mainForm.popmenuLeft.add('向下插入一行',function(id){ var curSelection = mainForm.g_flexcell.selection(); teUtils.insertFlexCellNewRow(mainForm.g_flexcell, curSelection.FirstRow + 1, 1, mainForm.g_flexcell.colCount); curSelection.release(); - collectgarbage("collect"); - collectgarbage("collect"); + mainForm.release(); } ) //右侧弹出菜单 mainForm.popmenuRight = win.ui.popmenu(mainForm); @@ -323,15 +319,13 @@ mainForm.popmenuRight.add('向左插入一列',function(id){ var curSelection = mainForm.g_flexcell.selection(); teUtils.insertFlexCellNewCol(mainForm.g_flexcell, curSelection.FirstCol, 1, mainForm.g_flexcell.colCount); curSelection.release(); - collectgarbage("collect"); - collectgarbage("collect"); + mainForm.release(); } ) mainForm.popmenuRight.add('向右插入一列',function(id){ var curSelection = mainForm.g_flexcell.selection(); teUtils.insertFlexCellNewCol(mainForm.g_flexcell, curSelection.FirstCol+1, 1, mainForm.g_flexcell.colCount); curSelection.release(); - collectgarbage("collect"); - collectgarbage("collect"); + mainForm.release(); } )