Hey so I actually found a solution on the forum from ages ago. If anyone else is interested you basically have to copy list data source class into a separate module and add in a background colour attribute, works well
This is a working version without significant leak.
def update(image_view, ui_image):
image_view.image = ui_image
all_photos = photos.get_assets()
for p in all_photos:
ui_image = p.get_ui_image(size=(300,300))
#image_data = p.get_image_data()
v = ui.View()
with concurrent.futures.ThreadPoolExecutor(max_workers=1) as executor:
Thanks very much for all the suggestions. I'm grateful for the tip about threading and will try to incorporate it into the rest of the project but the thing that does the lifting here is the autoreleasepool context manager; with just this addition and removing the threading it works just fine.
@struct_engr_ , I think the problem is that for the past 6 months or so, no emails from this forum get actually sent. Neither the password resets or other notifications. @omz, any chance you could take a look?
@lachlantula , no problems. I was just intrested in trying it after @abcabc pointed out the secure attr. I have see things go strange before when you play with the size of the system font. But initially I was using the default size. Oh, well