When `HashTable` was told to replace an object with itself, it ended up
incrementing its reference count because of the legacy equality check
(previously `FreeSelf()` completely deallocated an object, so the check
was warranted).
Previously `Iter` was meant to be a collection iterator class, but now
we need a more generalized notion of iterator, so we move some
collection-specific methods out and designate `Iter` a general iterator
class, while `CollectionIterator` takes its former place.
commit dd6f236b360640b4c5ca2bfefdddf11482ab1bcf
Author: Anton Tarasenko <dkanus@gmail.com>
Date: Mon Jul 4 03:55:45 2022 +0700
Change `AcediaConfig` to use new collections
We are just copying `DynamicArray` into `ArrayList` with slightly
different behavior. There are still no tests and some small errors pop
up due to changes being made. This patch fixes them.
`RemoveItem()` method for `AssociativeArray()` is now able to deallocate
keys. `Empty()` method is now defined in a `Collectino` class and allows
users to recursively free nested collections, while deallocating their
keys.
I shamefully ended up doing another mega-commit, because a lot of things
needed to be redone at once and it was easier that way on me. No one
really consistently tracks what I'm doing with these commits anyway.
This adds a whole bunch of code to deal with proper clean up for Acedia,
so it doesn't crash on map change and also replaces old event/listener
system with new signals/slots one.
Now Acedia collections provide functionality of `Get...ByPointer()`
method (that allows to fetch values nested into several collection by
JSON pointers) for both `JSONPointer` and `Text` classes.
Previously, each use of `Get...ByPointer()` method caused convertion of
a `Text` into `JSONPointer`, even if used `Text` value did not change.
This patch allows to create `JSONPointer` once and them use that as a
parameter, which should be much faster.