Ban use of ComPtr::GetAddressOf() |
|
Issue descriptionUsing 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 |
|