From: David Kastrup Date: Wed, 1 Jun 2016 15:16:43 +0000 (+0200) Subject: Issue 4872: Remove Protected_scm destructor X-Git-Tag: release/2.19.43-1~18 X-Git-Url: https://git.donarmstrong.com/?a=commitdiff_plain;h=b3100a922eccf4ecc0570d3859959113267e017f;p=lilypond.git 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. --- 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;