<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
</head>
<body bgcolor="#FFFFFF" text="#000000">
<div class="moz-cite-prefix">On 09/17/17 13:07, Emil Velikov wrote:<br>
</div>
<blockquote type="cite"
cite="mid:CACvgo522=sWWs9SSfEJYCMDVCoD-69rWfum6-EjN6A3mLi4wsA@mail.gmail.com">
<pre wrap="">Having the opposite - a destructor [1] should provide symmetry and consistency.
Furthermore using atexit is not as portable/reliable as one would think.</pre>
</blockquote>
<br>
It should be the destructor that handles this. Either the user
clears it, or destructor clears it.<br>
<br>
<br>
<blockquote type="cite"
cite="mid:CACvgo522=sWWs9SSfEJYCMDVCoD-69rWfum6-EjN6A3mLi4wsA@mail.gmail.com">
<pre wrap="">All this is obviously orthogonal to the original issue reported <span class="moz-smiley-s3" title=";-)"><span>;-)</span></span>
</pre>
</blockquote>
<p><br>
</p>
<p>I don't see how it is orthogonal.<br>
</p>
<p><br>
</p>
<p>There is actually <code class="cpp plain">__attribute__((destructor))
<a class="moz-txt-link-freetext" href="https://phoxis.org/2011/04/27/c-language-constructors-and-destructors-with-gcc">https://phoxis.org/2011/04/27/c-language-constructors-and-destructors-with-gcc</a>
It works with gcc and clang, and probably with most or all other
compilers.<br>
</code></p>
<p><br>
</p>
<p>Yuri<br>
</p>
</body>
</html>