New issue
Advanced search Search tips

Issue 914910 link

Starred by 1 user

Issue metadata

Status: Assigned
Owner:
Components:
EstimatedDays: ----
NextAction: ----
OS: Windows
Pri: 3
Type: Bug



Sign in to add a comment

Ban use of ComPtr::GetAddressOf()

Project Member Reported by reillyg@chromium.org, Dec 13

Issue description

Using GetAddressOf() in order to get the address of the internal storage of a ComPtr for use as an output parameter is only safe when it is guaranteed that that ComPtr has not been previously initialized. The ReleaseAndGetAddressOf() function (and its alias, operator&) are guaranteed to release the object currently held by the ComPtr before returning the address of the internal storage for initialization.
 

Sign in to add a comment