Remember that the leaks tool doesn't tell you where a leak is created. It tells you where the leaked object was created. So this line of code is where the object was created but it's probably leaked somewhere else.
If you have a dictionary then you have strings, either as keys or values in the dictionary. If a value from the dictionary is retained somewhere and never released that would cause this kind of leak.
If the container object itself were leaked then all the keys and values would also be leaked. Is that the case? Is the dictionary leaked? If not, then this line of code is kind of a red herring. The leak is elsewhere.
|