mirror of
https://github.com/EsotericSoftware/spine-runtimes.git
synced 2025-12-21 17:56:04 +08:00
Merge branch '3.8' into 3.9-beta
This commit is contained in:
commit
f8455ac5c9
@ -61,6 +61,11 @@ public:
|
|||||||
getInstance()->_free((void *) ptr, file, line);
|
getInstance()->_free((void *) ptr, file, line);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
template<typename T>
|
||||||
|
static void beforeFree(T *ptr) {
|
||||||
|
getInstance()->_beforeFree((void *) ptr);
|
||||||
|
}
|
||||||
|
|
||||||
static char *readFile(const String &path, int *length) {
|
static char *readFile(const String &path, int *length) {
|
||||||
return getInstance()->_readFile(path, length);
|
return getInstance()->_readFile(path, length);
|
||||||
}
|
}
|
||||||
@ -83,6 +88,8 @@ public:
|
|||||||
|
|
||||||
virtual char *_readFile(const String &path, int *length) = 0;
|
virtual char *_readFile(const String &path, int *length) = 0;
|
||||||
|
|
||||||
|
virtual void _beforeFree(void *ptr) { SP_UNUSED(ptr); }
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
SpineExtension();
|
SpineExtension();
|
||||||
|
|
||||||
|
|||||||
@ -63,4 +63,5 @@ void SpineObject::operator delete(void *p) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
SpineObject::~SpineObject() {
|
SpineObject::~SpineObject() {
|
||||||
|
SpineExtension::beforeFree(this);
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user