Reduce leaks.

Signed-off-by: Andrea Odetti <mariofutire@gmail.com>
This commit is contained in:
Andrea Odetti 2017-06-09 20:41:38 +01:00
parent 1d12b788ea
commit ced5c39401

View file

@ -94,6 +94,14 @@ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
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));