FEditorPanelRegistry
Find hands out a pointer INTO the storage and the callers dispatch through it — desc->OnDocumentClosed(path), desc->GetSurface(). A vector made that pointer a liability twice over: a registration after the pointer was taken reallocated and left it dangling (a plugin registering its panels the first time a document of its kind closes is exactly that shape), and replacing a descriptor in place destroyed the very std::function running through the old pointer. So descriptors live in a deque — push_back never moves the elements already handed out — and a re-registration retires the old entry instead of overwriting it, which keeps every pointer Find ever returned readable for the life of the registry. Retired entries are bounded by the number of re-registrations and never freed on purpose.
- Module
- EditorFramework
- Header
#include "EditorFramework/EditorPanelRegistry.h"- Namespace
Mowo
Public functions
Function details
Register
void Register(FEditorPanelDesc desc)Find
const FEditorPanelDesc* Find(const std::string& kind) constCount
size_t Count() const