When a COM interface is held by wxCOMPtr, one should not call
Interface->Release(), as it decreases the interface's reference
count without wxCOMPtr owning the interface being aware of that.
When then wxCOMPtr calls Interface->Release() in its destructor
the reference count is erroneously decreased again, which is bound
to result in bad things happening.
If one needs to release an interface held by wxCOMPtr immediately,
wxCOMPtr::reset() should be used instead.
These Release() calls should have been removed in 938506b1f7 (Use
wxCOMPtr throughout the wxWebViewIE Find code., 2013-05-18), which
introduced the use of wxCOMPtr, but were forgotten there.
Closes https://github.com/wxWidgets/wxWidgets/pull/2626
Closes #15207.
58 KiB
58 KiB