PDA

View Full Version : Is it a bug ?


solexalex
2004-12-15, 22:14
hi !
i found something strange... python keep the variables in memory (xbmc cvs 04 12 13)
i launch one script, then another one, and i figure out that a var in the second script get the value stored in the forst script....

i'm not very good to make me 'understandable'...
can you understand ? thanks for help

darkie
2004-12-15, 23:09
yup, this could be possible ( though i never noticed it myself)
best thing you could do is to cleanup the classes / variables at script exit with the command 'del'.

and if you look at most scripts out there you will notice they all use 'del window' at some time.

solexalex
2004-12-15, 23:25
i use del window as well...
but maybe the first script i launched don't do it... let me see...
no ! first script and second one both do a del after the domodal...

any other idea ? it looks like a bug...

darkie
2004-12-15, 23:48
you probably need to delete more then only the window, for example, if you have global data (defined outside a class) you need to free that too

solexalex
2004-12-16, 00:46
ok
it is strange cause it is the first time i see that...
never need to delete all ... ??

solexalex
2004-12-16, 19:16
can a scripter try to make some tests...
set a var in a script
then run a second script that read the same name var.
script 1 : set myvar=10
script 2 : read myvar = ??