Difference between static and new.
What is the difference between 'static' and 'new' when it comes to strings?
When I should use 'static', when 'new' ? -Thx in advance :) |
Re: Difference between static and new.
There is a snippet by Hawk552 about this.
|
Re: Difference between static and new.
Quote:
http://forums.alliedmods.net/showthr...=106358&page=5 |
Re: Difference between static and new.
So kinda like..
It's more readable and kind of well-coded using (for arrays): PHP Code:
PHP Code:
|
Re: Difference between static and new.
No no.
Using static means the memory is created one time so the var is not initialized each time. It's like a global var but restricted to the function. You can see an example there. |
Re: Difference between static and new.
I get it!
Thx Arkshine, +k! |
| All times are GMT -4. The time now is 17:32. |
Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.