Fix The rest of UI7 Mem leaks
Throw OneFrame living objs into a pool
This commit is contained in:
@@ -32,6 +32,7 @@ namespace UI7 {
|
||||
*/
|
||||
class PD_API Label : public Container {
|
||||
public:
|
||||
Label() {}
|
||||
/**
|
||||
* Constructor for Label Object
|
||||
* @param label Label [Text] to Draw
|
||||
@@ -54,6 +55,13 @@ class PD_API Label : public Container {
|
||||
*/
|
||||
void Update() override;
|
||||
|
||||
void Reset() override {
|
||||
Container::Reset();
|
||||
tdim = 0;
|
||||
color = UI7Color_Text;
|
||||
label.clear();
|
||||
}
|
||||
|
||||
private:
|
||||
fvec2 tdim; ///< Text Size
|
||||
UI7Color color = UI7Color_Text; ///< Color
|
||||
|
||||
Reference in New Issue
Block a user