Review request for Soprano and Vishesh Handa.
By Simeon Bird.
Updated June 11, 2013, 10:42 p.m.
Much easier way to prevent the ErrorCache from leaking - note that before it would not leak until there was an error, but once it did, it would leak for every thread that executed, even the successful ones.
Fix memory leak in ErrorCache
Soprano::Error::ErrorCache stores a QHash <QThread*, Error>
giving the last error in each thread.
Change the implementation so clearError() calls remove(), instead
of setting the error to a default value. This prevents the hash
growing endlessly. It is still possible for error values to leak,
but only when someone forgets to call clearError() before a thread
finishes (and only when an actual error occurs).
- soprano/error.h (12d233e)
- soprano/error.cpp (bff34dd)