From 7f8f6bf4c2da5056fec32c82986c4f5af20113a9 Mon Sep 17 00:00:00 2001 From: Ted Gould Date: Thu, 29 Jan 2015 08:34:50 -0600 Subject: Make the destructor private to protect from accidental deleting --- tests/pa-mock.cpp | 2 ++ 1 file changed, 2 insertions(+) (limited to 'tests') diff --git a/tests/pa-mock.cpp b/tests/pa-mock.cpp index 8ca2374..5dd5c9b 100644 --- a/tests/pa-mock.cpp +++ b/tests/pa-mock.cpp @@ -55,10 +55,12 @@ public: g_debug("Creating Context: %p", this); } +private: /* To ensure we're the only ones who can delete it */ ~PAMockContext () { g_debug("Destroying Context: %p", this); } +public: /* Ref counting */ void ref () { refcnt++; -- cgit v1.2.3