Posts: 707
Joined: Jul 2004
Reputation:
6
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
Posts: 529
Joined: Sep 2003
Reputation:
0
darkie
Team-Kodi Member
Posts: 529
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.
Posts: 707
Joined: Jul 2004
Reputation:
6
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...
Posts: 529
Joined: Sep 2003
Reputation:
0
darkie
Team-Kodi Member
Posts: 529
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
Posts: 707
Joined: Jul 2004
Reputation:
6
ok
it is strange cause it is the first time i see that...
never need to delete all ... ??
Posts: 707
Joined: Jul 2004
Reputation:
6
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 = ??