From b93257b357d38f43a18d13755a1f36fe0c9f89cf Mon Sep 17 00:00:00 2001 From: Aaron Giles Date: Wed, 16 Feb 2011 05:56:07 +0000 Subject: [PATCH] Make emu_timer destructor private to prevent direct freeing. --- src/emu/schedule.c | 9 +++++++++ src/emu/schedule.h | 2 ++ 2 files changed, 11 insertions(+) diff --git a/src/emu/schedule.c b/src/emu/schedule.c index 948758cc477..985f4c66cd1 100644 --- a/src/emu/schedule.c +++ b/src/emu/schedule.c @@ -93,6 +93,15 @@ emu_timer::emu_timer() } +//------------------------------------------------- +// ~emu_timer - destructor +//------------------------------------------------- + +emu_timer::~emu_timer() +{ +} + + //------------------------------------------------- // init - completely initialize the state when // re-allocated as a non-device timer diff --git a/src/emu/schedule.h b/src/emu/schedule.h index 02e8a57bd9a..959d2345ad5 100644 --- a/src/emu/schedule.h +++ b/src/emu/schedule.h @@ -89,9 +89,11 @@ class emu_timer friend class device_scheduler; friend class simple_list; friend class fixed_allocator; + friend class resource_pool_object; // construction/destruction emu_timer(); + ~emu_timer(); // allocation and re-use emu_timer &init(running_machine &machine, timer_expired_func callback, const char *name, void *ptr, bool temporary);