diff --git a/spine-cpp/spine-cpp/include/spine/SkeletonBinary.h b/spine-cpp/spine-cpp/include/spine/SkeletonBinary.h index af27cb47f..d25cfa771 100644 --- a/spine-cpp/spine-cpp/include/spine/SkeletonBinary.h +++ b/spine-cpp/spine-cpp/include/spine/SkeletonBinary.h @@ -80,7 +80,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 050b38050..1aecbef37 100644 --- a/spine-cpp/spine-cpp/include/spine/SkeletonJson.h +++ b/spine-cpp/spine-cpp/include/spine/SkeletonJson.h @@ -63,7 +63,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 90705d4bb..d3017ab52 100644 --- a/spine-cpp/spine-cpp/src/spine/SkeletonBinary.cpp +++ b/spine-cpp/spine-cpp/src/spine/SkeletonBinary.cpp @@ -80,8 +80,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 fea195dee..1b4c58ac5 100644 --- a/spine-cpp/spine-cpp/src/spine/SkeletonJson.cpp +++ b/spine-cpp/spine-cpp/src/spine/SkeletonJson.cpp @@ -108,8 +108,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); }