Home -> IGraphicsDeviceEnumerator -> Delete

Description

The Delete method destroys the object. Note that unlike all created objects from the IRenderer interface, deleting the renderer does not perform deferred destruction, and fully destroys the object before it returns. Also note that IGraphicsDevice objects returned through this interface are owned by the enumerator, and are destroyed when the enumerator is destroyed.

ImportantImportant

While you must keep the IGraphicsDeviceEnumerator around in order to be able to retain access to the IGraphicsDevice objects returned through it, deleting the IGraphicsDeviceEnumerator and its owned IGraphicsDevice objects has no impact on IRenderer objects which have been created. It is perfectly valid to keep an IRenderer object alive after the device it was created from has been destroyed.

WarningWarning

Under normal circumstances, this method should never need to be called directly. The unique_ptr which is returned when this object is constructed will call this method itself when the pointer is released. You must not call this method if the object lifetime is still being managed by the unique_ptr object, otherwise the method will be called more than once. If this occurs the behaviour is undefined, and it may result in runtime errors.

Usage

void Delete();

See also