2

Is there a way to programmatically free Image resources in nativescript-vue?

I can't use the RadListView or ListView in some situations because they have issues properly rendering some of my more-complex components. Instead, I'm using a ScrollView. Now my view renders correctly, but after a while the app runs out of memory due to all the images that are loaded (as the user scrolls more images are loaded).

I'd like to free memory for images that are not visible on the page. I know how to calculate when the image is off the page, but don't know how to remove or replace the element to free the memory.

Everything I've read says to use small images (I'm already optimizing them) and then the GC will cleanup resources that are no longer used. However, the images are still technically in use until the user navigates away from the page or I can find a way to remove them from the page.

miker
  • 101
  • 7

0 Answers0