[AC-6080] iOS: TiBlob proxies not being garbage collected from TiUIImageView
GitHub Issue | n/a |
---|---|
Type | Bug |
Priority | n/a |
Status | Closed |
Resolution | Done |
Resolution Date | 2018-12-26T05:19:45.000+0000 |
Affected Version/s | n/a |
Fix Version/s | n/a |
Components | Titanium SDK & CLI |
Labels | n/a |
Reporter | Richard Lustemberg |
Assignee | Shak Hossain |
Created | 2018-12-25T15:52:31.000+0000 |
Updated | 2019-01-23T10:25:50.000+0000 |
Description
TiUIImageView's with a TiBlob as an image property do not destroy the blobs when the property is nulled (using an empty string) or when the image view itself is garbage collected.
In an application where photo filters are being applied after a photo is taken this issue leads to massive TiBlob objects remaining alive in memory. The window where the processed images are being displayed doesn't release the TiBlobs, even if I explicitely loop over all the image views and null the image property.
I've found the cause. I was using ti.imagefactory and a module of mine which where returning a TiBlob which was not initialised using _initWithPageContext. I'll provide a PR for the Ti.Factory module. After the TiBlob was initialized with the page context the proxy was tracked properly and gargabe collected in due time
+1 for that PR!
@Hans , I'll take care of the PR