Merge pull request #1200 from Trial97/net_job_crash

Made ByteSynkArray to use shared_ptr
This commit is contained in:
Rachel Powers 2023-06-23 09:13:52 -07:00 committed by Sefa Eyeoglu
parent 9df3c5d3c0
commit 05056e1abf
No known key found for this signature in database
GPG key ID: E13DFD4B47127951
47 changed files with 659 additions and 793 deletions

View file

@ -1,7 +1,8 @@
// SPDX-License-Identifier: GPL-3.0-only
/*
* PolyMC - Minecraft Launcher
* Prism Launcher - Minecraft Launcher
* Copyright (c) 2022 flowln <flowlnlnln@gmail.com>
* Copyright (c) 2023 Trial97 <alexandru.tripon97@gmail.com>
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@ -46,7 +47,7 @@ namespace Net {
*/
class ByteArraySink : public Sink {
public:
ByteArraySink(QByteArray* output) : m_output(output){};
ByteArraySink(std::shared_ptr<QByteArray> output) : m_output(output){};
virtual ~ByteArraySink() = default;
@ -93,6 +94,6 @@ class ByteArraySink : public Sink {
auto hasLocalData() -> bool override { return false; }
private:
QByteArray* m_output;
std::shared_ptr<QByteArray> m_output;
};
} // namespace Net