Skip to content

Commit

Permalink
[#211]
Browse files Browse the repository at this point in the history
Destructor fuer Floppy1581 angelegt und im C64Class werden die
Floppy1581 jetzt deletet.
  • Loading branch information
ThKattanek committed Aug 20, 2021
1 parent a2e8717 commit 66ad1f6
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 0 deletions.
1 change: 1 addition & 0 deletions src/c64_class.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -568,6 +568,7 @@ C64Class::~C64Class()
for(int i=0; i<MAX_FLOPPY_NUM; i++)
{
if(floppy1541[i] != nullptr) delete floppy1541[i];
if(floppy1581[i] != nullptr) delete floppy1581[i];
}

if(mmu != nullptr) delete mmu;
Expand Down
5 changes: 5 additions & 0 deletions src/floppy1581_class.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,11 @@ Floppy1581::Floppy1581(bool *reset)
}
}

Floppy1581::~Floppy1581()
{
if(cpu != nullptr) delete cpu;
}

void Floppy1581::SetC64IEC(uint8_t *iec)
{

Expand Down
2 changes: 2 additions & 0 deletions src/floppy1581_class.h
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,8 @@ class Floppy1581
/// Funktionen ///

Floppy1581(bool *reset);
~Floppy1581();

void SetC64IEC(uint8_t *iec);
void SetResetReady(bool* ResetReady, uint16_t ResetReadyAdr);
void SetDeviceNumber(uint8_t number);
Expand Down

0 comments on commit 66ad1f6

Please sign in to comment.