Skip to content

Commit 285aa88

Browse files
committed
Do not destroy textures in Skin subclasses
Skin should already handle this.
1 parent 21e98f7 commit 285aa88

File tree

4 files changed

+0
-13
lines changed

4 files changed

+0
-13
lines changed

src/bitmapskin.cpp

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -36,11 +36,6 @@ BitmapSkin::BitmapSkin(libscratchcpp::Costume *costume) :
3636
qWarning() << "invalid bitmap texture (costume name: " + costume->name() + ")";
3737
}
3838

39-
BitmapSkin::~BitmapSkin()
40-
{
41-
m_texture.release();
42-
}
43-
4439
Texture BitmapSkin::getTexture(double scale) const
4540
{
4641
return m_texture;

src/bitmapskin.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,6 @@ class BitmapSkin : public Skin
1919
{
2020
public:
2121
BitmapSkin(libscratchcpp::Costume *costume);
22-
~BitmapSkin();
2322

2423
Texture getTexture(double scale) const override;
2524
double getTextureScale(const Texture &texture) const override;

src/svgskin.cpp

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -29,12 +29,6 @@ SVGSkin::SVGSkin(libscratchcpp::Costume *costume) :
2929
m_maxIndex = std::min(i1, i2);
3030
}
3131

32-
SVGSkin::~SVGSkin()
33-
{
34-
for (const auto &[index, texture] : m_textures)
35-
m_textureObjects[texture].release();
36-
}
37-
3832
Texture SVGSkin::getTexture(double scale) const
3933
{
4034
// https://github.com/scratchfoundation/scratch-render/blob/423bb700c36b8c1c0baae1e2413878a4f778849a/src/SVGSkin.js#L158-L176

src/svgskin.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,6 @@ class SVGSkin : public Skin
2121
{
2222
public:
2323
SVGSkin(libscratchcpp::Costume *costume);
24-
~SVGSkin();
2524

2625
Texture getTexture(double scale) const override;
2726
double getTextureScale(const Texture &texture) const override;

0 commit comments

Comments
 (0)