diff --git a/include/comphelper/interfacecontainer4.hxx b/include/comphelper/interfacecontainer4.hxx index 20429954d56d..6ec1ca7179e2 100644 --- a/include/comphelper/interfacecontainer4.hxx +++ b/include/comphelper/interfacecontainer4.hxx @@ -369,7 +369,8 @@ void OInterfaceContainerHelper4::disposeAndClear(std::unique_lock aIt(rGuard, *this); - maData->clear(); + maData + = DEFAULT(); // cheaper than calling maData->clear() because it doesn't allocate a new vector rGuard.unlock(); // unlock followed by iterating is only safe because we are not going to call remove() on the iterator while (aIt.hasMoreElements())