Fix The rest of UI7 Mem leaks

Throw OneFrame living objs into a pool
This commit is contained in:
2026-09-05 18:06:59 +02:00
parent fc5a357caa
commit d18e397eaf
9 changed files with 122 additions and 49 deletions
+9
View File
@@ -38,6 +38,7 @@ namespace UI7 {
*/
class PD_API DynObj : public Container {
public:
DynObj() {}
/**
* Button Object constructor
* @param label Label of the Button
@@ -69,6 +70,14 @@ class PD_API DynObj : public Container {
/** Function to Update Size if framepadding changes */
void Update() override;
void Reset() override {
Container::Reset();
color = UI7Color_Button;
pressed = false;
pRenFun = nullptr;
pInp = nullptr;
}
private:
UI7Color color = UI7Color_Button; ///< current button color
bool pressed = false; ///< ispressed value