Raised This Month: $ Target: $400
 0% 

Cleaning a bit of memory by "const" or "#define"


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Author Message
dFF
sıɹɹoɥɔ ʞɔnu
Join Date: Oct 2009
Old 06-28-2012 , 04:45   Cleaning a bit of memory by "const" or "#define"
Reply With Quote #1

For example, If I used much plugin who use a lot of 'datas' (offset, custom values, etc), what is the best method to hold these 'datas' whit "const" or "#define" ?
If I use "#define" while clear a bit of memory, for example:
PHP Code:
#define MY_OFFSET 114
#define OFF_DIFF 5
#define MY_VALUE 3
set_pdata_intidMY_OFFSETMY_VALUEOFF_DIFF )
// after compile set:
set_pdata_intid1143
and If I used "const" while set:
PHP Code:
set_pdata_intidMY_OFFSETMY_VALUEOFF_DIFF 
right ?

What is the better solution ?

Thanks, and sorry for stupid question.
dFF 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 06:12.


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