Memory Leak In QUnit.equiv

Memory Leak In QUnit.equiv

During our analysis on our qunit test suite, we found an issue originated from QUnit.equiv().

We use Chrome dev tool memory tab to take snapshot of the memory, and we found that the global queue "pairs" still holds references to the objects (and their sub-objects) we passed into QUnit.equiv(). When the objects to be compared are big, the leak is big as well. We currently workaround this issue by invoking QUnit.equiv() again with two empty strings, that will replace the global queue with the two empty string, thus free the two big objects.