-
Per Hedbor authored
Replace uses search_array, which in turn calls check_array_for_destruct. So, if you had an array where all elements were replaced by the replace containing at least one object replace() was O(n^2), not O(n). In general check_array_for_destruct is rather unneeded, since the comparison functions already checks for destructed objects, but I guess that it might cause objects to be free:d slightly sooner.
Per Hedbor authoredReplace uses search_array, which in turn calls check_array_for_destruct. So, if you had an array where all elements were replaced by the replace containing at least one object replace() was O(n^2), not O(n). In general check_array_for_destruct is rather unneeded, since the comparison functions already checks for destructed objects, but I guess that it might cause objects to be free:d slightly sooner.