Titanium JIRA Archive
Appcelerator Community (AC)

[AC-6080] iOS: TiBlob proxies not being garbage collected from TiUIImageView

GitHub Issuen/a
TypeBug
Priorityn/a
StatusClosed
ResolutionDone
Resolution Date2018-12-26T05:19:45.000+0000
Affected Version/sn/a
Fix Version/sn/a
ComponentsTitanium SDK & CLI
Labelsn/a
ReporterRichard Lustemberg
AssigneeShak Hossain
Created2018-12-25T15:52:31.000+0000
Updated2019-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.

Comments

  1. Richard Lustemberg 2018-12-25

    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
  2. Hans Knöchel 2018-12-27

    +1 for that PR!
  3. Richard Lustemberg 2019-01-23

    @Hans , I'll take care of the PR

JSON Source