1
0
mirror of https://github.com/TomHarte/CLK.git synced 2024-12-27 16:31:31 +00:00

Settled on assigning to nullptr as the appropriate style for emptying shared_ptrs; fixed the Vic properly to release its output resources.

This commit is contained in:
Thomas Harte 2016-07-04 20:34:11 -04:00
parent 6851a1b63b
commit bfa237397d
3 changed files with 7 additions and 2 deletions

View File

@ -100,7 +100,7 @@ void Machine::switch_region()
void Machine::close_output()
{
_crt.reset();
_crt = nullptr;
}
Machine::~Machine()

View File

@ -122,6 +122,11 @@ void Machine::setup_output(float aspect_ratio)
_mos6560.reset(new MOS::MOS6560());
}
void Machine::close_output()
{
_mos6560 = nullptr;
}
void Machine::set_rom(ROMSlot slot, size_t length, const uint8_t *data)
{
uint8_t *target = nullptr;

View File

@ -167,7 +167,7 @@ class Machine:
// to satisfy CRTMachine::Machine
virtual void setup_output(float aspect_ratio);
virtual void close_output() {}
virtual void close_output();
virtual std::shared_ptr<Outputs::CRT::CRT> get_crt() { return _mos6560->get_crt(); }
virtual std::shared_ptr<Outputs::Speaker> get_speaker() { return _mos6560->get_speaker(); }
virtual void run_for_cycles(int number_of_cycles) { CPU6502::Processor<Machine>::run_for_cycles(number_of_cycles); }