>" instead of using variables, you can reduce memory consumption, increase performance, and simplify programs. "
>
>Simply because PUBLIC variables are always residing in the memory and is available in the entire application as compare to custom properties which are within the FORM only and are released when the FORM releases.
Well, the memory consumption issue is questionable. The memory consumption is the same if you have at least one object instantiated. As soon as you have more than one, it's obvious that the memory consumption is higher with properties than public vars.
Public vars can be released too.
Besides that, I agree that it's usually better to use properties instead of public vars. But not because of memory constraints.
>Same thing with #INCLUDE header files (for #DEFINE, #IF, #IFDEF etc.) which is recommended when you have constant values being used.
This is a little different as #include and #define are evaluated at compile time (precompile time?) and they don't consume memory. A big disadvantage with these directives is that they are very time consuming at compile time. So time consuming that I never use them (obviously, with some exceptions:)).
And I'm not sure that you'll use less memory with #define directives that define large strings.
Vlad
Précédent
Répondre
Voir le fil de ce thread
Voir le fil de ce thread à partir de ce message seulement
Voir tous les messages de ce thread
Voir tous les messages de ce thread à partir de ce message seulement