diff --git a/es-core/src/AsyncHandle.h b/es-core/src/AsyncHandle.h index 4d07de5be..7f2e26667 100644 --- a/es-core/src/AsyncHandle.h +++ b/es-core/src/AsyncHandle.h @@ -12,6 +12,7 @@ class AsyncHandle { public: AsyncHandle() : mStatus(ASYNC_IN_PROGRESS) {}; + virtual ~AsyncHandle() {}; virtual void update() = 0; diff --git a/es-core/src/components/NinePatchComponent.cpp b/es-core/src/components/NinePatchComponent.cpp index 9d10be123..1b1eba3ab 100644 --- a/es-core/src/components/NinePatchComponent.cpp +++ b/es-core/src/components/NinePatchComponent.cpp @@ -14,6 +14,15 @@ NinePatchComponent::NinePatchComponent(Window* window, const std::string& path, buildVertices(); } +NinePatchComponent::~NinePatchComponent() +{ + if (mVertices != NULL) + delete[] mVertices; + + if (mColors != NULL) + delete[] mColors; +} + void NinePatchComponent::updateColors() { Renderer::buildGLColorArray(mColors, mEdgeColor, 6 * 9); diff --git a/es-core/src/components/NinePatchComponent.h b/es-core/src/components/NinePatchComponent.h index ca99c859e..1fcfcb881 100644 --- a/es-core/src/components/NinePatchComponent.h +++ b/es-core/src/components/NinePatchComponent.h @@ -18,6 +18,7 @@ class NinePatchComponent : public GuiComponent { public: NinePatchComponent(Window* window, const std::string& path = "", unsigned int edgeColor = 0xFFFFFFFF, unsigned int centerColor = 0xFFFFFFFF); + virtual ~NinePatchComponent(); void render(const Eigen::Affine3f& parentTrans) override;