Skip to content

Destroy

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.

void Destroy(PrismaView view);
  • Type: PrismaView
  • Description: The PrismaView to remove from memory

This method returns void.

// Simple view destruction
PrismaUI->Destroy(view);
logger::info("View destroyed and memory freed");
  • Cleanup on Exit: Always destroy views during plugin shutdown
  • Validity Check: Use IsValid before destroying to avoid unnecessary operations
  • Resource Management: Destroy views when they’re no longer needed to free memory