Skip to content

Latest commit

 

History

History
21 lines (14 loc) · 1.46 KB

reference-tracking.md

File metadata and controls

21 lines (14 loc) · 1.46 KB
title description ms.assetid ms.topic ms.date
Reference Tracking
Reference Tracking
1e2cf555-3b96-42d5-a0bb-abb720c93520
article
05/31/2018

Reference Tracking

Reference tracking can prevent the unintentional or malicious early release of objects.

When you enable reference tracking, you are requesting that distributed AddRef and Release calls be authenticated by COM. When reference tracking is enabled, COM keeps track of per-user reference counts so that a user can call Release only on objects that the user previously called AddRef on. Although reference tracking can decrease performance, it ensures that no matter how many times a given user calls Release, the objects and stubs will still exist if someone else has a reference to them.

The client can set reference tracking for a process by passing the EOAC_SECURE_REFS capability flag in a call to CoInitializeSecurity. You can also enable or disable reference tracking for all applications on a computer by using Dcomcnfg.exe.

If reference tracking is enabled, IUnknown always uses default security settings. In this case, calls to CoSetProxyBlanket on IUnknown will fail.