Skip to content

Commit 7a259ab

Browse files
committed
[lib] Attempt at fixing memory leak caused by double retain
1 parent dd01424 commit 7a259ab

1 file changed

Lines changed: 0 additions & 2 deletions

File tree

Source/AttributeManager.c

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -105,7 +105,6 @@ static void StoreAttributeDictionaryInCache(AttributeDictionaryCacheRef cache,
105105
/* Only cache if this is the last reference */
106106
if (retainCount == 1) {
107107
AttributeDictionaryClear(dictionary);
108-
AttributeDictionaryRetain(dictionary);
109108
ListAdd(&cache->_attributeDicts, &dictionary);
110109
}
111110
}
@@ -666,7 +665,6 @@ static void RemoveAttributeEntryRange(AttributeManagerRef manager,
666665
AttributeEntry *entry = ListGetRef(&manager->_entries, entryIndex);
667666

668667
StoreAttributeDictionaryInCache(&manager->_cache, entry->attributes);
669-
AttributeDictionaryRelease(entry->attributes);
670668
}
671669

672670
ListRemoveRange(&manager->_entries, index, length);

0 commit comments

Comments
 (0)