共用方式為


IVsLifetimeControlledObject 介面

指示復原物件,來釋出設計工具] 或 [緩衝區的參考。

命名空間:  Microsoft.VisualStudio.TextManager.Interop
組件:  Microsoft.VisualStudio.TextManager.Interop (在 Microsoft.VisualStudio.TextManager.Interop.dll 中)

語法

'宣告
<InterfaceTypeAttribute()> _
<GuidAttribute("B3B2E5D4-F03E-4BB9-85F9-61B5F45AC498")> _
Public Interface IVsLifetimeControlledObject
[InterfaceTypeAttribute()]
[GuidAttribute("B3B2E5D4-F03E-4BB9-85F9-61B5F45AC498")]
public interface IVsLifetimeControlledObject
[InterfaceTypeAttribute()]
[GuidAttribute(L"B3B2E5D4-F03E-4BB9-85F9-61B5F45AC498")]
public interface class IVsLifetimeControlledObject
[<InterfaceTypeAttribute()>]
[<GuidAttribute("B3B2E5D4-F03E-4BB9-85F9-61B5F45AC498")>]
type IVsLifetimeControlledObject =  interface end
public interface IVsLifetimeControlledObject

IVsLifetimeControlledObject 類型會公開下列成員。

方法

  名稱 描述
公用方法 SeverReferencesToOwner 指示復原物件,來釋出設計工具] 或 [緩衝區的參考。

回頁首

備註

在某些情況下,您可以將復原管理員中的非作用中狀態時主控物件已經死了。 設計工具可以使用這個相同的方法,以指示它釋放它的參考,並不會呼叫這些指標上任何的復原物件。 若要管理這種情況,您就可以呼叫QueryInterface上的復原管理員IVsLifetimeControlledObject。 一旦您有變數的指標, IVsLifetimeControlledObject,呼叫SeverReferencesToOwner。 這個方法會移除所有復原重做堆疊,使其擁有的物件,然後離開安全。

呼叫者注意事項

當您的文件中關閉時,會呼叫QueryInterface IID_IVsLifetimeControlledObject 為您復原管理員上。

請參閱

參考

Microsoft.VisualStudio.TextManager.Interop 命名空間