Files

> > CS2D > Lua Scripts > Memory Cleaner/Garbage Collector v1.0
Files overviewCS2D overviewLua Scripts overview

English Memory Cleaner/Garbage Collector v1.0 >

17 comments2 kb, 477 Downloads

old Memory Cleaner/Garbage Collector v1.0

MikuAuahDark
User Off Offline

Memory Cleaner or Garbage Collector by user MikuAuahDark

∗ 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 ∗
• > file cs2d Improved AddHook 2 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(cs2d lua hook 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(cs2d lua cmd addhook) even if file cs2d Improved AddHook 2 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 user 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
>
ADDED
Initial Release
edited 1×, last 03.11.13 01:00:23 am
Approved by Seekay

Download Download

2 kb, 477 Downloads

Comments

17 comments
To the start Previous 1 Next To the start

Log in!

You need to log in to be able to write comments!Log in

old

tek69
User Off Offline

bad as shit.

old

MikuAuahDark
User Off Offline

user MrSlave has written
WHA DIS TING MANE TO MUCH TEXTTT
sorry but i can't understand you.

old

MrSlave
BANNED Off Offline

WHA DIS TING MANE TO MUCH TEXTTT

old

MikuAuahDark
User Off Offline

user _Yank has written
Does this really make a diference ?
yes. You can see it decreased with task manager

old

_Yank
User Off Offline

Does this really make a diference ?
About how much seconds of diference ? - In a super hero script + admin script v30 for example.
Ãnywas helpful.
I like it!

old

VADemon
User Off Offline

user MikuAuahDark has written
This LUA would make your server more faster by cleaning memory every 5 minutes and every 5 times

Why do you think that you're more efficient than Lua itself?
Same story as in Java with system.gc() IMHO

old

Avo
User Off Offline

You know, it's very easy, but at least you wrote proper description. All descriptions would look like yours.

about variables access >

old

MikuAuahDark
User Off Offline

user Promaster has written
Nice Script, But need more explanation about how this Script really works. What exactly does it Cleans?
a value that can't accessed by any variable
and also do you want to see some explanation how it works? take a look at MemoryCleaner_desc.lua

old

Promaster
User Off Offline

Nice Script, But need more explanation about how this Script really works. What exactly does it Cleans?
I like it!

old

MikuAuahDark
User Off Offline

user Obronca has written
This Script is Hard :v , I Think you must teach me to make it :v
simple, just put this at your code
1
collectgarbage("collect")
i already said that is a simple script

old

iii
User Off Offline

is good
I like it!

old

Obronca
User Off Offline

This Script is Hard :v , I Think you must teach me to make it :v
I like it!

old

MikuAuahDark
User Off Offline

user iii has written
i am suspicious. Does collectgarbage("collect") only delete values which are not needed?

It's delete a value which does not have any variable.

old

XiBaoZi
COMMUNITY BANNED Off Offline

Useful.
I like it!

old

iii
User Off Offline

i am suspicious. Does collectgarbage("collect") only delete values which are not needed?
I like it!
To the start Previous 1 Next To the start