Fix The rest of UI7 Mem leaks
Throw OneFrame living objs into a pool
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user