Destroy
Overview
Section titled “Overview”Completely removes a PrismaView from memory and unfocuses it. This method performs a complete cleanup of the view, freeing all associated resources and ensuring proper memory management.
Syntax
Section titled “Syntax”void Destroy(PrismaView view);Parameters
Section titled “Parameters”view (required)
Section titled “view (required)”- Type:
PrismaView - Description: The
PrismaViewto remove from memory
Return Value
Section titled “Return Value”This method returns void.
Usage Examples
Section titled “Usage Examples”// Simple view destructionPrismaUI->Destroy(view);SKSE::log::info("View destroyed and memory freed");Best Practices
Section titled “Best Practices”- Cleanup on Exit: Always destroy views during plugin shutdown
- Validity Check: Use
IsValidbefore destroying to avoid unnecessary operations - Resource Management: Destroy views when they’re no longer needed to free memory