Am 12.10.2009 um 17:11 schrieb Aparajita Fishman:
I found out, that every time there is a process-variable in the
game (if a reference to a collection, or not, it makes memory
problems). I eliminated a lot of them in my application, and this
helps.
I will eliminate this leak, but in general you shouldn't use process
variables as globals.
But now I have to do a lot of
global($myPseudoProcessVar) in most methods.
If you only want the variable to be global to the current request,
this is not correct. The globals collection is global to every
process. It's the equivalent to interprocess variables in 4D.
Why is this not correct?
Manual Page 219:
global(localVar {; localVarN} | *)
Parameter Type Description
localVar | * Local Variable | * → Local variable to bring into
current scope, or all locals
I know, the other solution would be to use the _request collection.
I think this is the correct solution.
Isn't it possible, to declare a view variables as global in a
special way (in On Execute Start) , so that in any method this
variables are global without declare it in the method.
The simplest solution would be to allow you to use global() in the
global scope, which would make the variables global to the entire
request. I'll have to see if this is possible. In the meantime
please use _request.
Kind regards,
Aparajita
_______________________________________________
Active4D-dev mailing list
[email protected]
http://mailman.aparajitaworld.com/mailman/listinfo/active4d-dev
Archives: http://mailman.aparajitaworld.com/archive/active4d-dev/