Skip to content

Commit 34287c9

Browse files
AkshayWarrierandyholmes
authored andcommitted
Memory Monitor: Change else ifs to ifs (#516)
* library: Add Memory Monitor entry * Update main.json * Update main.blp * Memory Monitor: Suggestions * Memory Monitor: Change else ifs to ifs
1 parent 2fc619f commit 34287c9

File tree

1 file changed

+4
-2
lines changed
  • src/Library/demos/Memory Monitor

1 file changed

+4
-2
lines changed

src/Library/demos/Memory Monitor/main.js

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,10 +13,12 @@ memory_monitor.connect("low-memory-warning", (monitor, level) => {
1313
// Processes should free up unneeded resources
1414
console.log("Warning Level: Low");
1515
drop_caches();
16-
} else if (level >= Gio.MemoryMonitorWarningLevel.MEDIUM) {
16+
}
17+
if (level >= Gio.MemoryMonitorWarningLevel.MEDIUM) {
1718
// Processes should try harder to free up unneeded resources
1819
console.log("Warning Level: Medium");
19-
} else if (level >= Gio.MemoryMonitorWarningLevel.CRITICAL) {
20+
}
21+
if (level >= Gio.MemoryMonitorWarningLevel.CRITICAL) {
2022
// system will start terminating processes to reclaim memory
2123
console.log("Warning Level: Critical");
2224
}

0 commit comments

Comments
 (0)