Description
This LUA would make your server more faster by cleaning memory every 5 minutes and every 5 times(default, can be configured at MemoryCleaner.lua)
This LUA is presents for a newbie scripter
This LUA is useful when you're running big scripts
It just use collectgarbage() LUA function
Features
Improved AddHook 2 (5) compatible
Configurable settings(see below)
How to Install
Just put MemoryCleaner.lua or MemoryCleaner_desc.lua at sys/lua/autorun
Reserved Global Variables
MemoryCleaner
CleanTimes
TimeToClean
ShowMsg
NormHook
Information
Hooks: 1( second)
Lines: 30
Configuration
On MemoryCleaner.lua or MemoryCleaner_desc.lua you can see a configuration variable. Here is the list of it
CleanTimes - Every 5 minutes do x times cleaning(default 5)
TimeToClean - Clean every x seconds(default 300, 5 minutes)
ShowMsg - Show message when cleaning is performed to stdout/console. true by default
NormHook - Always use normal hook( addhook) even if Improved AddHook 2 (5) is used(true by default, it can make it little faster)
Rules
You can use it for your server
You can edit it
You can upload at another website, say MikuAuahDark made it
You can't say this is yours
You can't upload on another website without put me on credits
Notes
1. Tell me if there is a bugs
2. There is a file named MemoryCleaner_desc.lua. It just do same but file contents are different. it has description how the code works.
3. You can use MemoryCleaner.lua or MemoryCleaner_desc.lua. It just do same
4. Note that this is just simple scripts
Version History
v1.0
Initial Release
edited 1×, last 03.11.13 01:00:23 am
Approved by Seekay
Download
2 kb, 476 Downloads