UVerticalBox::ReleaseSlateResources is incorrectly declared as protected instead of public

Summary

UVerticalBox::ReleaseSlateResources is incorrectly declared under the protected access specifier instead of public, breaking API consistency and causing compilation failures when called directly on the concrete type.

What Type of Bug are you experiencing?

Framework

Steps to Reproduce

Create a C++ class or module that includes “Components/VerticalBox.h”.

Instantiate or reference a pointer of the concrete type: UVerticalBox* MyVerticalBox;

Attempt to call the release function directly on the pointer: MyVerticalBox->ReleaseSlateResources(true);

Compile the project.

Expected Result

The compilation should succeed because ReleaseSlateResources is a public virtual function in the base class UWidget, and it is exposed as public in all other derived standard layout components (e.g., UHorizontalBox, UCanvasPanel, UBorder).

Observed Result

The compilation fails with a C++ compiler error stating that the member is inaccessible (e.g., cannot access protected member declared in class ‘UVerticalBox’).

Affects Versions

5.8

Platform(s)

Windows

Additional Notes

In VerticalBox.h, move virtual void ReleaseSlateResources(bool bReleaseChildren) override; out of the protected: section and place it into the public: section.

This looks like an API consistency issue in the framework rather than an intended access restriction. Since UWidget::ReleaseSlateResources is public and other derived widgets expose it publicly, UVerticalBox having it under protected creates an unexpected breaking change for C++ users. Moving the override into the public section in VerticalBox.h should align it with the rest of the widget hierarchy and restore expected behavior.