From b3100a922eccf4ecc0570d3859959113267e017f Mon Sep 17 00:00:00 2001 From: David Kastrup <dak@gnu.org> Date: Wed, 1 Jun 2016 17:16:43 +0200 Subject: [PATCH] Issue 4872: Remove Protected_scm destructor Protected_scm works only for static data and single members cannot be destructed without destroying the whole protection chain. When static member destructors are called, the Guile memory subsystem is already down, so tampering with the storage is just a waste of effort and snake oil at best. --- lily/include/protected-scm.hh | 1 - lily/protected-scm.cc | 9 --------- 2 files changed, 10 deletions(-) diff --git a/lily/include/protected-scm.hh b/lily/include/protected-scm.hh index 48a26b15c9..82b1fed11f 100644 --- a/lily/include/protected-scm.hh +++ b/lily/include/protected-scm.hh @@ -49,7 +49,6 @@ class Protected_scm public: Protected_scm (); Protected_scm (SCM); - ~Protected_scm (); Protected_scm &operator = (SCM); Protected_scm &operator = (Protected_scm const &); operator SCM () const; diff --git a/lily/protected-scm.cc b/lily/protected-scm.cc index 225c64dc60..6f6ce7c744 100644 --- a/lily/protected-scm.cc +++ b/lily/protected-scm.cc @@ -37,15 +37,6 @@ Protected_scm::Protected_scm (SCM s) assert (SCM_IMP (s)); } -// For static objects, this will be called at program exit. With the -// state of the memory system unknown, we refrain from any cleanup -// actions outside of the object memory itself. - -Protected_scm::~Protected_scm () -{ - object_ = SCM_UNDEFINED; -} - SCM Protected_scm::list_ = SCM_EOL; SCM Protected_scm::last_ = SCM_EOL; -- 2.39.5