DiscIO: Fix NAND Memory Leak

CNANDContentData is a base class with a non-virtual destructor so
derived classes don't get destroyed causing them to leak resources.
This commit is contained in:
EmptyChaos 2016-09-10 04:38:04 +00:00
parent 54a643a4a3
commit eccec3c6d3
2 changed files with 3 additions and 0 deletions

View File

@ -29,6 +29,8 @@
namespace DiscIO namespace DiscIO
{ {
CNANDContentData::~CNANDContentData() = default;
CSharedContent::CSharedContent() CSharedContent::CSharedContent()
{ {
UpdateLocation(); UpdateLocation();

View File

@ -25,6 +25,7 @@ bool AddTicket(u64 title_id, const std::vector<u8>& ticket);
class CNANDContentData class CNANDContentData
{ {
public: public:
virtual ~CNANDContentData() = 0;
virtual void Open(){}; virtual void Open(){};
virtual const std::vector<u8> Get() = 0; virtual const std::vector<u8> Get() = 0;
virtual bool GetRange(u32 start, u32 size, u8* buffer) = 0; virtual bool GetRange(u32 start, u32 size, u8* buffer) = 0;