次の方法で共有


IVsLifetimeControlledObject Interface

Definition

Instructs undo objects to release references to a designer or buffer.

public interface class IVsLifetimeControlledObject
public interface class IVsLifetimeControlledObject
__interface IVsLifetimeControlledObject
[System.Runtime.InteropServices.Guid("B3B2E5D4-F03E-4BB9-85F9-61B5F45AC498")]
[System.Runtime.InteropServices.InterfaceType(1)]
public interface IVsLifetimeControlledObject
[System.Runtime.InteropServices.Guid("B3B2E5D4-F03E-4BB9-85F9-61B5F45AC498")]
[System.Runtime.InteropServices.InterfaceType(System.Runtime.InteropServices.ComInterfaceType.InterfaceIsIUnknown)]
public interface IVsLifetimeControlledObject
[<System.Runtime.InteropServices.Guid("B3B2E5D4-F03E-4BB9-85F9-61B5F45AC498")>]
[<System.Runtime.InteropServices.InterfaceType(1)>]
type IVsLifetimeControlledObject = interface
[<System.Runtime.InteropServices.Guid("B3B2E5D4-F03E-4BB9-85F9-61B5F45AC498")>]
[<System.Runtime.InteropServices.InterfaceType(System.Runtime.InteropServices.ComInterfaceType.InterfaceIsIUnknown)>]
type IVsLifetimeControlledObject = interface
Public Interface IVsLifetimeControlledObject
Attributes

Remarks

In some cases you may want to place the undo manager in the inactive state when the owning object has died. A designer can use this same method to instruct its undo objects to release references to it and not call on those pointers any more. To manage this, you can call QueryInterface on the undo manager for IVsLifetimeControlledObject. Once you have a pointer to IVsLifetimeControlledObject, call SeverReferencesToOwner. This method removes all Undo and Redo stacks, making it safe for the owning object to go away.

Notes to Callers

When your document in closed, call QueryInterface on your undo manager for IID_IVsLifetimeControlledObject.

Methods

SeverReferencesToOwner()

Instructs undo objects to release references to a designer or buffer.

Applies to