string lenght 755?
#1

Is there a mistake if i write new string[755] for example?
or it has to be 128,256,524... ?
Reply
#2

Quote:
Originally Posted by PepsiCola23
Посмотреть сообщение
Is there a mistake if i write new string[755] for example?
or it has to be 128,256,524... ?
It doesn't really matter.
Reply
#3

String sizes don't have to be 128, 256, etc. Y Less actually wrote a topic about this, but my repost of it got deleted for whatever reason. You still shouldn't use a large amount of cells unless you need it. Having more cells slows down the compiler, and can waste memory.
Reply
#4

I never say don't use string sizes like 128, 256, 512 etc.
Use the lowest size that is really required, I have a "new string[2000];" in my script and I really need it! No body can says that is wrong, but this number is the size that is allocated in your memory, and remember "new string[2000];" will allocate 8000 (2000 * 4) bytes from your memory which is actually a lot and it can cause problem when your script is big.
Also check out packed strings, if you use packed strings with a size of 2000, it will allocate only 2000 bytes of your memory.
Reply
#5

Ok guys got it,thank you .
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)