mirror of
https://github.com/EsotericSoftware/spine-runtimes.git
synced 2025-12-21 01:36:02 +08:00
Fixed leak.
This commit is contained in:
parent
cff77e7dea
commit
da960ae935
@ -43,21 +43,21 @@
|
|||||||
using namespace sf;
|
using namespace sf;
|
||||||
|
|
||||||
void _AtlasPage_createTexture (AtlasPage* self, const char* path){
|
void _AtlasPage_createTexture (AtlasPage* self, const char* path){
|
||||||
Texture* texture = new Texture();
|
Texture* texture = new Texture();
|
||||||
if (!texture->loadFromFile(path)) return;
|
if (!texture->loadFromFile(path)) return;
|
||||||
texture->setSmooth(true);
|
texture->setSmooth(true);
|
||||||
self->rendererObject = texture;
|
self->rendererObject = texture;
|
||||||
Vector2u size = texture->getSize();
|
Vector2u size = texture->getSize();
|
||||||
self->width = size.x;
|
self->width = size.x;
|
||||||
self->height = size.y;
|
self->height = size.y;
|
||||||
}
|
}
|
||||||
|
|
||||||
void _AtlasPage_disposeTexture (AtlasPage* self){
|
void _AtlasPage_disposeTexture (AtlasPage* self){
|
||||||
delete (Texture*)self->rendererObject;
|
delete (Texture*)self->rendererObject;
|
||||||
}
|
}
|
||||||
|
|
||||||
char* _Util_readFile (const char* path, int* length){
|
char* _Util_readFile (const char* path, int* length){
|
||||||
return _readFile(path, length);
|
return _readFile(path, length);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**/
|
/**/
|
||||||
@ -76,6 +76,7 @@ SkeletonDrawable::SkeletonDrawable (SkeletonData* skeletonData, AnimationStateDa
|
|||||||
|
|
||||||
SkeletonDrawable::~SkeletonDrawable () {
|
SkeletonDrawable::~SkeletonDrawable () {
|
||||||
delete vertexArray;
|
delete vertexArray;
|
||||||
|
FREE(worldVertices);
|
||||||
AnimationState_dispose(state);
|
AnimationState_dispose(state);
|
||||||
Skeleton_dispose(skeleton);
|
Skeleton_dispose(skeleton);
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user