# Max list length and variable Memory Leaks

Hi
I am developing a program that makes a lot of use of variables and arrays for calculating positions.

As @anibal.m.hillier pointed out to me here:

Yes, you can make a list with poses, but I remember there is a limit to the lenght of the list.

If my memory doesn’t fail the limit is near 33 items and in this project he’s using more than 300 points, so he won’t be able to load them on the same list.

I have been looking for the max list length and also when variable and i found this.

Be aware, that the maximal length of a variable definition with the Assignment command is 1024 bytes, regardless of the amount of array items. So the more precise your Pose, the shorter the list can be.
PolyScope will only read the first 1024 chars of the Assignment command,.

Can someone elaborate more about this? Does this also apply for variables and is this still the case? is there an other way to inprove this?

And for me important how manny poses can I store? pose need to be stored at 0.01mm so 0.00001m.
is it like: 2^1024=1.798 x 10^308 => 308/6 = 51 poses?

thank you in advance,
Corné

I’d encourage you to check out Universal Robots - Interpreter mode released with 5.10.
Lists are not designed to hold a lot of poses.

1 Like

Thank you for your answer, maybe it will be a long term solution for me but right now i want to fix it with a small list.

as I was talking about the list size with a friend. He had as an option to take the 2D list appart into 6 1D list for X,Y,Z,Rx,Ry,Rz.
He pointed me in the right direction for looking on memory leaks as i wrote in the program below. so before i did his advice i was looking for when memory loss would became a problem (for my application i can work around with 20 poses but future i want more)

in last picture it will pop up the current var_3 at i=2318

a few weeks back i never heard about memory loss and updated my theory knowledge to look for a practical solution… But nowpractice is not in line with theory, cause i don’t get anny memory loss. now i am wondering how this aint happening. does annyone have ideas or did i do somthing wrong or have I hacked the system … Programmer’s Problem: The Code Doesn’t Work Why? It works Why?