--- In [email protected], "jroncalm" <jroncal2...@...> wrote:
>
> Hi Bruce:
> 
> I have a script to monitor tabs in maxthon (as filter) (Gray check, 
> every 2 seconds).
> It runs fine the first 2 or 3 minutes.
> After no longer works.
> I put a check to debug, and I found that the vectors are cut to the 
> first letter after running 2 or 3 minutes.
> 
> My script condensed:
> ------------------------------------
> ; monitor of tabs
> n = 2
> vect = vec.create(n+1)



Your script creates a new vector each time it is called, (and "leaks",
ie loses, the memory of the previous version; but PowerPro does not
know you do not need it anymore).  To fix, use
local vect = vec.create(n+1)
so that the vector is automatically destroyed at the end of the script.

PowerPro can only support 50 vectors at a time (unless you use
vec.maxvecs).  So on the 51st call to your script, no vector is
returned, and the variable vect behaves like a string, with [xxx]
doing character extracts, explaining what you see.



Reply via email to