Disk_t and HDD cannot free the memory in their destructor as they dont really own it.

Signed-off-by: Andrea Odetti <mariofutire@gmail.com>
This commit is contained in:
Andrea Odetti 2018-02-13 08:38:24 +00:00
parent 91050fc3bd
commit 2df7a7c67b
2 changed files with 0 additions and 33 deletions

View file

@ -109,33 +109,6 @@ struct Disk_t
clear();
}
~Disk_t()
{
if (imagehandle)
ImageClose(imagehandle);
if (trackimage)
VirtualFree(trackimage, 0, MEM_RELEASE);
}
const Disk_t& operator= (const Disk_t& other)
{
memcpy(imagename, other.imagename, sizeof(imagename));
memcpy(fullname , other.fullname, sizeof(fullname));
strFilenameInZip = other.strFilenameInZip;
imagehandle = other.imagehandle;
bWriteProtected = other.bWriteProtected;
track = other.track;
trackimage = other.trackimage;
phase = other.phase;
byte = other.byte;
trackimagedata = other.trackimagedata;
trackimagedirty = other.trackimagedirty;
spinning = other.spinning;
writelight = other.writelight;
nibbles = other.nibbles;
return *this;
}
void clear()
{
ZeroMemory(imagename, sizeof(imagename));

View file

@ -119,12 +119,6 @@ struct HDD
clear();
}
~HDD()
{
if (imagehandle)
ImageClose(imagehandle);
}
void clear()
{
// This is not a POD (there is a std::string)