svoid installSimpleMemoryWarningSystem() { MemoryWarningSystem.setPercentageUsageThreshold(0.6); new MemoryWarningSystem mws; mws.addListener(new MemoryWarningSystem.Listener() { public void memoryUsageLow(long usedMemory, long maxMemory) { infoBox_noHide("Memory usage low!!!"); double percentageUsed = ((double) usedMemory) / maxMemory; print("percentageUsed = " + percentageUsed); MemoryWarningSystem.setPercentageUsageThreshold(0.8); } }); print("Memory warning system installed, will print here & show info box"); }
download show line numbers debug dex old transpilations
Travelled to 13 computer(s): aoiabmzegqzx, bhatertpkbcr, cbybwowwnfue, cfunsshuasjs, gwrvuhgaqvyk, irmadwmeruwu, ishqpsrjomds, lpdgvwnxivlt, mqqgnosmbjvj, pyentgdyhuwx, pzhvpgtvlbxg, tvejysmllsmz, vouqrxazstgt
No comments. add comment
Snippet ID: | #1018953 |
Snippet name: | installSimpleMemoryWarningSystem |
Eternal ID of this version: | #1018953/3 |
Text MD5: | d8d931bfa860e832956a3cbda7617a8e |
Author: | stefan |
Category: | javax |
Type: | JavaX fragment (include) |
Public (visible to everyone): | Yes |
Archived (hidden from active list): | No |
Created/modified: | 2018-10-18 13:51:19 |
Source code size: | 576 bytes / 14 lines |
Pitched / IR pitched: | No / No |
Views / Downloads: | 276 / 322 |
Version history: | 2 change(s) |
Referenced in: | #1006654 - Standard functions list 2 (LIVE, continuation of #761) |