]> git.donarmstrong.com Git - lilypond.git/commitdiff
Issue 4872: Remove Protected_scm destructor
authorDavid Kastrup <dak@gnu.org>
Wed, 1 Jun 2016 15:16:43 +0000 (17:16 +0200)
committerDavid Kastrup <dak@gnu.org>
Mon, 6 Jun 2016 08:03:50 +0000 (10:03 +0200)
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
lily/protected-scm.cc

index 48a26b15c995a4d948a5c4974dd9da02f414cb71..82b1fed11f95b2beb1f474b72e016fd2c6166d8d 100644 (file)
@@ -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;
index 225c64dc60fc220bf03910f25575a539a3ecbdfd..6f6ce7c7442152fbd6def56d62e1fd49b24a4b5d 100644 (file)
@@ -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;