diff --git a/spine-cpp/spine-cpp/include/spine/SkeletonBinary.h b/spine-cpp/spine-cpp/include/spine/SkeletonBinary.h index 88af8bd77..0a59f3085 100644 --- a/spine-cpp/spine-cpp/include/spine/SkeletonBinary.h +++ b/spine-cpp/spine-cpp/include/spine/SkeletonBinary.h @@ -68,7 +68,7 @@ namespace spine { explicit SkeletonBinary(Atlas* atlasArray); - explicit SkeletonBinary(AttachmentLoader* attachmentLoader); + explicit SkeletonBinary(AttachmentLoader* attachmentLoader, bool ownsLoader = false); ~SkeletonBinary(); diff --git a/spine-cpp/spine-cpp/include/spine/SkeletonJson.h b/spine-cpp/spine-cpp/include/spine/SkeletonJson.h index b719855a4..aeb60f5ba 100644 --- a/spine-cpp/spine-cpp/include/spine/SkeletonJson.h +++ b/spine-cpp/spine-cpp/include/spine/SkeletonJson.h @@ -57,7 +57,7 @@ class SP_API SkeletonJson : public SpineObject { public: explicit SkeletonJson(Atlas *atlas); - explicit SkeletonJson(AttachmentLoader *attachmentLoader); + explicit SkeletonJson(AttachmentLoader *attachmentLoader, bool ownsLoader = false); ~SkeletonJson(); diff --git a/spine-cpp/spine-cpp/src/spine/SkeletonBinary.cpp b/spine-cpp/spine-cpp/src/spine/SkeletonBinary.cpp index f26398a77..ac61ab83d 100644 --- a/spine-cpp/spine-cpp/src/spine/SkeletonBinary.cpp +++ b/spine-cpp/spine-cpp/src/spine/SkeletonBinary.cpp @@ -98,8 +98,8 @@ SkeletonBinary::SkeletonBinary(Atlas *atlasArray) : _attachmentLoader( } -SkeletonBinary::SkeletonBinary(AttachmentLoader *attachmentLoader) : _attachmentLoader(attachmentLoader), _error(), - _scale(1), _ownsLoader(false) +SkeletonBinary::SkeletonBinary(AttachmentLoader* attachmentLoader, bool ownsLoader) : _attachmentLoader(attachmentLoader), _error(), +_scale(1), _ownsLoader(ownsLoader) { assert(_attachmentLoader != NULL); } diff --git a/spine-cpp/spine-cpp/src/spine/SkeletonJson.cpp b/spine-cpp/spine-cpp/src/spine/SkeletonJson.cpp index 18be34c90..54f94c6a9 100644 --- a/spine-cpp/spine-cpp/src/spine/SkeletonJson.cpp +++ b/spine-cpp/spine-cpp/src/spine/SkeletonJson.cpp @@ -84,8 +84,8 @@ SkeletonJson::SkeletonJson(Atlas *atlas) : _attachmentLoader(new(__FILE__, __LIN _scale(1), _ownsLoader(true) {} -SkeletonJson::SkeletonJson(AttachmentLoader *attachmentLoader) : _attachmentLoader(attachmentLoader), _scale(1), - _ownsLoader(false) +SkeletonJson::SkeletonJson(AttachmentLoader *attachmentLoader, bool ownsLoader) : _attachmentLoader(attachmentLoader), _scale(1), + _ownsLoader(ownsLoader) { assert(_attachmentLoader != NULL); }