HardwareRenderer.Destroy Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Destroys the rendering context of this HardwareRenderer.
[Android.Runtime.Register("destroy", "()V", "GetDestroyHandler", ApiSince=29)]
public virtual void Destroy ();
[<Android.Runtime.Register("destroy", "()V", "GetDestroyHandler", ApiSince=29)>]
abstract member Destroy : unit -> unit
override this.Destroy : unit -> unit
- Attributes
Remarks
Destroys the rendering context of this HardwareRenderer. This destroys the resources associated with this renderer and releases the currently set Surface
. This must be called when this HardwareRenderer is no longer needed.
The renderer may be restored from this state by setting a new Surface
, setting new rendering content with #setContentRoot(RenderNode)
, and resuming rendering by issuing a new FrameRenderRequest
.
It is recommended to call this in response to callbacks such as android.view.SurfaceHolder.Callback#surfaceDestroyed(SurfaceHolder)
.
Note that if there are any outstanding frame commit callbacks they may never being invoked if the frame was deferred to a later vsync.
Java documentation for android.graphics.HardwareRenderer.destroy()
.
Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.