Skip to content

Commit 5a0a5b0

Browse files
committed
refactor: make ClientScript.clientScriptCache private
1 parent 24bc305 commit 5a0a5b0

File tree

2 files changed

+6
-2
lines changed

2 files changed

+6
-2
lines changed

src/main/java/org/runejs/client/Game.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1985,7 +1985,7 @@ public static void clearCaches() {
19851985
PlayerAppearance.clearPlayerModelCache();
19861986
GameInterface.clearInterfaceCaches();
19871987
((Class35) Rasterizer3D.interface3).clearTextures();
1988-
ClientScript.clientScriptCache.clear();
1988+
ClientScript.clearClientScriptCache();
19891989
CacheArchive.skeletonCacheArchive.clearCache();
19901990
CacheArchive.skinDefinitionCacheArchive.clearCache();
19911991
CacheArchive.gameInterfaceCacheArchive.clearCache();

src/main/java/org/runejs/client/cache/cs/ClientScript.java

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414

1515
public class ClientScript extends CachedNode {
1616

17-
public static NodeCache clientScriptCache = new NodeCache(128);
17+
private static NodeCache clientScriptCache = new NodeCache(128);
1818

1919
public int[] intOperands;
2020
public int intStackCount;
@@ -24,6 +24,10 @@ public class ClientScript extends CachedNode {
2424
public int localIntCount;
2525
public int[] opcodes;
2626

27+
public static void clearClientScriptCache() {
28+
clientScriptCache.clear();
29+
}
30+
2731

2832
public static void clientScriptDebugger() {
2933
int len = CacheArchive.clientScriptCacheArchive.getLength();

0 commit comments

Comments
 (0)