mirror of
https://github.com/EsotericSoftware/spine-runtimes.git
synced 2025-12-22 02:06:03 +08:00
Fixed small memory leak.
This commit is contained in:
parent
5c6ebf2c63
commit
77d7bf83fb
@ -55,7 +55,7 @@
|
|||||||
#define FREE(VALUE) _free((void*)VALUE)
|
#define FREE(VALUE) _free((void*)VALUE)
|
||||||
|
|
||||||
/* Allocates a new char[], assigns it to TO, and copies FROM to it. Can be used on const types. */
|
/* Allocates a new char[], assigns it to TO, and copies FROM to it. Can be used on const types. */
|
||||||
#define MALLOC_STR(TO,FROM) strcpy(CONST_CAST(char*, TO) = (char*)malloc(strlen(FROM) + 1), FROM)
|
#define MALLOC_STR(TO,FROM) strcpy(CONST_CAST(char*, TO) = (char*)MALLOC(char, strlen(FROM) + 1), FROM)
|
||||||
|
|
||||||
#ifdef __STDC_VERSION__
|
#ifdef __STDC_VERSION__
|
||||||
#define FMOD(A,B) fmodf(A, B)
|
#define FMOD(A,B) fmodf(A, B)
|
||||||
|
|||||||
@ -34,6 +34,7 @@
|
|||||||
void _spRegionAttachment_dispose (spAttachment* attachment) {
|
void _spRegionAttachment_dispose (spAttachment* attachment) {
|
||||||
spRegionAttachment* self = SUB_CAST(spRegionAttachment, attachment);
|
spRegionAttachment* self = SUB_CAST(spRegionAttachment, attachment);
|
||||||
_spAttachment_deinit(attachment);
|
_spAttachment_deinit(attachment);
|
||||||
|
FREE(self->path);
|
||||||
FREE(self);
|
FREE(self);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user