|
|
@@ -69,7 +69,7 @@ inline void CollectionData::clear(ResourceManager* resources) {
|
|
|
auto currId = next;
|
|
|
auto slot = resources->getSlot(next);
|
|
|
next = slot->next();
|
|
|
- releaseSlot(SlotWithId(slot, currId), resources);
|
|
|
+ resources->freeSlot(SlotWithId(slot, currId));
|
|
|
}
|
|
|
|
|
|
head_ = NULL_SLOT;
|
|
|
@@ -102,7 +102,7 @@ inline void CollectionData::remove(iterator it, ResourceManager* resources) {
|
|
|
head_ = next;
|
|
|
if (next == NULL_SLOT)
|
|
|
tail_ = prev.id();
|
|
|
- releaseSlot({it.slot_, it.currentId_}, resources);
|
|
|
+ resources->freeSlot({it.slot_, it.currentId_});
|
|
|
}
|
|
|
|
|
|
inline size_t CollectionData::nesting(const ResourceManager* resources) const {
|
|
|
@@ -122,12 +122,4 @@ inline size_t CollectionData::size(const ResourceManager* resources) const {
|
|
|
return count;
|
|
|
}
|
|
|
|
|
|
-inline void CollectionData::releaseSlot(SlotWithId slot,
|
|
|
- ResourceManager* resources) {
|
|
|
- if (slot->ownsKey())
|
|
|
- resources->dereferenceString(slot->key());
|
|
|
- slot->data()->setNull(resources);
|
|
|
- resources->freeSlot(slot);
|
|
|
-}
|
|
|
-
|
|
|
ARDUINOJSON_END_PRIVATE_NAMESPACE
|