<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<oembed>
  <author_name>chiharunpo</author_name>
  <author_url>https://blog.hatena.ne.jp/chiharunpo/</author_url>
  <blog_title>Chiharu の日記</blog_title>
  <blog_url>https://chiharunpo.hatenablog.com/</blog_url>
  <categories>
    <anon>C++</anon>
  </categories>
  <description>先ほどの続き。 Egtra さんの指摘で、x86 でも /EH オプションが有効の場合には setjmp/longjmp でデストラクタが起動することが分かりました。 状況を確認してみましょう。まず、下記のクラスを用意して ctor/dtor の呼び出し状況がコンソールから分かるようにします。 struct Test { Test(int val):num(val) { std::cout &lt;&lt; &quot;ctor (&quot; &lt;&lt; num &lt;&lt; &quot;)&quot; &lt;&lt; std::endl; } ~Test() { std::cout &lt;&lt; &quot;dtor (&quot; &lt;&lt; num &lt;&lt; &quot;)&quot; &lt;&lt; std::endl; }…</description>
  <height>190</height>
  <html>&lt;iframe src=&quot;https://hatenablog-parts.com/embed?url=https%3A%2F%2Fchiharunpo.hatenablog.com%2Fentry%2F20110509%2F1304942799&quot; title=&quot;setjmp/longjmp とデストラクタ 〜Visual C++ の場合 - Chiharu の日記&quot; class=&quot;embed-card embed-blogcard&quot; scrolling=&quot;no&quot; frameborder=&quot;0&quot; style=&quot;display: block; width: 100%; height: 190px; max-width: 500px; margin: 10px 0px;&quot;&gt;&lt;/iframe&gt;</html>
  <image_url></image_url>
  <provider_name>Hatena Blog</provider_name>
  <provider_url>https://hatena.blog</provider_url>
  <published>2011-05-09 21:06:39</published>
  <title>setjmp/longjmp とデストラクタ 〜Visual C++ の場合</title>
  <type>rich</type>
  <url>https://chiharunpo.hatenablog.com/entry/20110509/1304942799</url>
  <version>1.0</version>
  <width>100%</width>
</oembed>
