Hi,
Just a programming basic quest, I do have with the experience of different projects , to be right different coding styles.
To have some variable and its value with following specifications:
i) Should be constant
ii) Should be globally available.
iii) Should not be causing any memory issues.
I have seen most of the projects using NSString constant value with extern scope, and AFAIK this can also be done with using preprocessor directives (#define).
After a bit of googling,.. I found that preprocessor directives are processed in the compile time.
So does this make the build (or the last product .app, .exe in general programming) size more or no effect.
Also please share, the pros and cons in the different scenarios.
Thank you.
Just a programming basic quest, I do have with the experience of different projects , to be right different coding styles.
To have some variable and its value with following specifications:
i) Should be constant
ii) Should be globally available.
iii) Should not be causing any memory issues.
I have seen most of the projects using NSString constant value with extern scope, and AFAIK this can also be done with using preprocessor directives (#define).
After a bit of googling,.. I found that preprocessor directives are processed in the compile time.
So does this make the build (or the last product .app, .exe in general programming) size more or no effect.
Also please share, the pros and cons in the different scenarios.
Thank you.