I have a scene based script in pythonista which displays a filled graph of values over time.
I implemented this by creating a list of ShapeNode objects. The number of these corresponds to the width of the display area. Each one is setup with ui.Path.rect(0,0,1,height). So each one is 1 pixel wide and the height corresponds to the value being graphed for that point in time. I create the set of ShapeNode objects only once.
Once created, on each scene update, I set the heights of all the ShapeNode objects by assigning a new ui.Path. I did this as I didn't see a way to change the height of an existing ui.Path.
The script seems to work well. But after it runs for a bit (still trying to get more precise timing on that), pythonista exits. My thought is that reassigning a couple hundred ui.Path's on each update may be leaking something.
My understanding is that python should gc these. Is that correct?
1) Is there a better way to adjust the height of the shapenode after it's created?
2) Is there some explicit call I need to release these if re-creating them each time?
3) Any idea on how to show current memory usage for my script so I could turn this functionality on off and see if I am getting continual growth in memory?