Raised This Month: $ Target: $400
 0% 

while() cpu load 100%


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Bugsy
AMX Mod X Moderator
Join Date: Feb 2005
Location: NJ, USA
Old 05-14-2009 , 10:19   Re: while() cpu load 100%
Reply With Quote #3

Quote:
Originally Posted by --kml-- View Post
oo maybe change new to static?

maybe will worK? xD
That is only beneficial if:
  • The function is being called very frequently. Here it is not
  • If the variable requires a lot of memory allocation . Here it does not
  • If you wish the data to remain static [stored in memory between function calls]. Here it is not necessary

Also, FYI, you cannot set a static variables value while declaring.

PHP Code:
//You cannot do:

static iVar 5;

//you CAN do:

static iVariVar 5
__________________
Bugsy is offline
 



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 01:28.


Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Theme made by Freecode