mirror of
https://github.com/RetroDECK/ES-DE.git
synced 2025-01-18 07:05:39 +00:00
Merge pull request #383 from deadbeef84/scraper-memleak-fix
Fixes two memory leaks, which caused the scraper to crash after a while....
This commit is contained in:
commit
1de0b888aa
|
@ -12,6 +12,7 @@ class AsyncHandle
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
AsyncHandle() : mStatus(ASYNC_IN_PROGRESS) {};
|
AsyncHandle() : mStatus(ASYNC_IN_PROGRESS) {};
|
||||||
|
virtual ~AsyncHandle() {};
|
||||||
|
|
||||||
virtual void update() = 0;
|
virtual void update() = 0;
|
||||||
|
|
||||||
|
|
|
@ -14,6 +14,15 @@ NinePatchComponent::NinePatchComponent(Window* window, const std::string& path,
|
||||||
buildVertices();
|
buildVertices();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
NinePatchComponent::~NinePatchComponent()
|
||||||
|
{
|
||||||
|
if (mVertices != NULL)
|
||||||
|
delete[] mVertices;
|
||||||
|
|
||||||
|
if (mColors != NULL)
|
||||||
|
delete[] mColors;
|
||||||
|
}
|
||||||
|
|
||||||
void NinePatchComponent::updateColors()
|
void NinePatchComponent::updateColors()
|
||||||
{
|
{
|
||||||
Renderer::buildGLColorArray(mColors, mEdgeColor, 6 * 9);
|
Renderer::buildGLColorArray(mColors, mEdgeColor, 6 * 9);
|
||||||
|
|
|
@ -18,6 +18,7 @@ class NinePatchComponent : public GuiComponent
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
NinePatchComponent(Window* window, const std::string& path = "", unsigned int edgeColor = 0xFFFFFFFF, unsigned int centerColor = 0xFFFFFFFF);
|
NinePatchComponent(Window* window, const std::string& path = "", unsigned int edgeColor = 0xFFFFFFFF, unsigned int centerColor = 0xFFFFFFFF);
|
||||||
|
virtual ~NinePatchComponent();
|
||||||
|
|
||||||
void render(const Eigen::Affine3f& parentTrans) override;
|
void render(const Eigen::Affine3f& parentTrans) override;
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue