Skip to content

Commit

Permalink
Add a cleanmem server mech
Browse files Browse the repository at this point in the history
  • Loading branch information
mcmonkey4eva committed May 26, 2015
1 parent 50a6cfa commit 873196f
Showing 1 changed file with 14 additions and 1 deletion.
15 changes: 14 additions & 1 deletion src/main/java/net/aufdemrand/denizen/tags/core/ServerTags.java
Expand Up @@ -959,7 +959,20 @@ public static void adjustServer(Mechanism mechanism) {
se.nanoTimes = 0;
}
}
// TODO: Properties somehow?

// <--[mechanism]
// @object server
// @name cleanmem
// @input None
// @description
// Suggests to the internal systems that it's a good time to clean the memory.
// Does NOT force a memory cleaning.
// @tags
// <server.ram_free>
// -->
if (mechanism.matches("cleanmem")) {
System.gc();
}

if (!mechanism.fulfilled())
mechanism.reportInvalid();
Expand Down

0 comments on commit 873196f

Please sign in to comment.