changeset 2818:d5d09bdd61d6

iOS: Fix a leak in the tree widget. Need to release the flatted tree array. Store it in the previously unused cache variable, and release it when we have a new array to take its place.
author bsmith@81767d24-ef19-dc11-ae90-00e081727c95
date Tue, 02 Aug 2022 03:34:39 +0000
parents 5000a8a43825
children a2fc275fa9bb
files ios/dw.m
diffstat 1 files changed, 3 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/ios/dw.m	Tue Aug 02 03:07:52 2022 +0000
+++ b/ios/dw.m	Tue Aug 02 03:34:39 2022 +0000
@@ -2771,6 +2771,9 @@
         for (DWTreeItem *child in _children)
             [allElements addObjectsFromArray:[child visibleNodes]];
     }
+    if(_flattenedTreeCache)
+        [_flattenedTreeCache release];
+    _flattenedTreeCache = allElements;
     return allElements;
 }
 -(void)insertChildAfter:(DWTreeItem *)treeItem