Am 19.12.2015 um 16:33 schrieb Logan Kelly:
Isn't this more a question of scope? If the pointer from is
mandatory,
then the variable is forced to have a larger scope then perhaps the
script writer intends? Not that a poiter doesn't have advantages, but
why should the compiler force a larger scope? That seems in conflict
with the argument against global variables.
No I don't think so. The names of the variables are in general different
inside and outside of the function, even though in pointer form they
point to the same memory. You could also do "delete marg" right after
completing the function call if you want to free that chunk of memory (I
think). Which adds yet another line of code of course, which is my main
mini-worry.
cheers,
sven