Skip to main content
API Reference com.nianticspatial.nsdk.playback PlaybackSession

dispose

Stops playback and releases all held references. Call from the owning component's teardown (e.g. [androidx.lifecycle.ViewModel.onCleared] or [android.app.Activity.onDestroy]) to prevent the listener lambda from retaining a reference to a destroyed component. After dispose, this session should not be reused.

Declaration

fun dispose()

Summary

Stops playback and releases all held references. Call from the owning component's teardown (e.g. [androidx.lifecycle.ViewModel.onCleared] or [android.app.Activity.onDestroy]) to prevent the listener lambda from retaining a reference to a destroyed component. After dispose, this session should not be reused.