<?xml version="1.0"?>
<rss version="2.0">
	<channel>
		<title>5.1.1 GL Window on Windows Takes longer to close than 5.1.0?</title>
		<link>http://www.allegro.cc/forums/view/609535</link>
		<description>Allegro.cc Forum Thread</description>
		<webMaster>matthew@allegro.cc (Matthew Leverton)</webMaster>
		<lastBuildDate>Tue, 14 Feb 2012 11:31:58 +0000</lastBuildDate>
	</channel>
	<item>
		<description><![CDATA[<div class="mockup v2"><p>I have just compiled binaries for 5.1.1 and tried it on my project. I noticed that now when I close the window, it takes about 2 seconds for it to close. I reverted back to 5.1.0 to see if it would close like normal and it did. If I use D3D this does not happen, only with OpenGL.</p><p>There is nothing special in my close code.</p><p>Is there something new added that I need to consider?</p><p>Thanks
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (jmasterx)</author>
		<pubDate>Mon, 13 Feb 2012 19:52:50 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><p>Destroy your bitmaps before the display?
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (Thomas Fjellstrom)</author>
		<pubDate>Mon, 13 Feb 2012 22:54:03 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><p>I&#39;ll try that when I get home. I&#39;m sure that is it. Thanks.</p><p>Though, why did it not do this before 5.1.1?
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (jmasterx)</author>
		<pubDate>Mon, 13 Feb 2012 22:56:52 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><p>5.1.1 has some new bitmap conversion semantics. It&#39;s possible that the new rules leave it so it won&#39;t auto download textures on exit (which makes sense, its silly to download them all if all you&#39;re doing is exiting).
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (Thomas Fjellstrom)</author>
		<pubDate>Mon, 13 Feb 2012 23:02:46 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><p>I checked the order and it seems correct:
</p><div class="source-code"><div class="toolbar"><span class="button numbers"><b>#</b></span><span class="button select">Select</span><span class="button expand">Expand</span></div><div class="inner"><span class="number">  1</span>  Core::~Core<span class="k2">(</span><span class="k1">void</span><span class="k2">)</span>
<span class="number">  2</span>  <span class="k2">{</span>
<span class="number">  3</span>    
<span class="number">  4</span>    <span class="k1">delete</span> sceneManager<span class="k2">;</span>
<span class="number">  5</span>    <span class="k1">delete</span> settings<span class="k2">;</span>
<span class="number">  6</span>    <span class="k1">delete</span> m_cardImageManager<span class="k2">;</span>
<span class="number">  7</span>    <span class="k1">delete</span> m_languageManager<span class="k2">;</span>
<span class="number">  8</span>    <span class="k1">delete</span> m_colorManager<span class="k2">;</span>
<span class="number">  9</span>    <span class="k1">delete</span> m_dynamicUIManager<span class="k2">;</span>
<span class="number"> 10</span>    <span class="k1">delete</span> m_fontManager<span class="k2">;</span>
<span class="number"> 11</span>    <span class="k1">delete</span> m_spriteManager<span class="k2">;</span>
<span class="number"> 12</span>    <span class="k1">delete</span> appIcon<span class="k2">;</span>
<span class="number"> 13</span>    <span class="k1">delete</span> display<span class="k2">;</span>
<span class="number"> 14</span>    _deinitAllegro<span class="k2">(</span><span class="k2">)</span><span class="k2">;</span>
<span class="number"> 15</span>  <span class="k2">}</span>
<span class="number"> 16</span>
<span class="number"> 17</span>  <span class="k1">void</span> Core::_deinitAllegro<span class="k2">(</span><span class="k2">)</span>
<span class="number"> 18</span>  <span class="k2">{</span>
<span class="number"> 19</span>    <a href="http://www.allegro.cc/manual/al_uninstall_keyboard"><span class="a">al_uninstall_keyboard</span></a><span class="k2">(</span><span class="k2">)</span><span class="k2">;</span>
<span class="number"> 20</span>    <a href="http://www.allegro.cc/manual/al_uninstall_mouse"><span class="a">al_uninstall_mouse</span></a><span class="k2">(</span><span class="k2">)</span><span class="k2">;</span>
<span class="number"> 21</span>    <a href="http://www.allegro.cc/manual/al_uninstall_audio"><span class="a">al_uninstall_audio</span></a><span class="k2">(</span><span class="k2">)</span><span class="k2">;</span>
<span class="number"> 22</span>    <a href="http://www.allegro.cc/manual/al_uninstall_system"><span class="a">al_uninstall_system</span></a><span class="k2">(</span><span class="k2">)</span><span class="k2">;</span>
<span class="number"> 23</span>  <span class="k2">}</span>
</div></div><p>

If I remove the call to al_destroy_display the speed is normal. But if I deinit Allegro before destroying the display it crashes so that does not work.
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (jmasterx)</author>
		<pubDate>Tue, 14 Feb 2012 01:26:47 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><p>Walk through a debugger and see if there&#39;s any particular call that takes two seconds.
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (Matthew Leverton)</author>
		<pubDate>Tue, 14 Feb 2012 01:30:58 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><p>It spent 1.37s doing al_clone_bitmap.</p><div class="source-code snippet"><div class="inner"><pre><span class="k1">static</span> <span class="k1">void</span> destroy_display_internals<span class="k2">(</span>ALLEGRO_DISPLAY_WGL <span class="k3">*</span>wgl_disp<span class="k2">)</span>
<span class="k1">void</span> _al_convert_to_memory_bitmap<span class="k2">(</span><a href="http://www.allegro.cc/manual/ALLEGRO_BITMAP"><span class="a">ALLEGRO_BITMAP</span></a> <span class="k3">*</span>bitmap<span class="k2">)</span>
<span class="k1">void</span> al_convert_bitmap<span class="k2">(</span><a href="http://www.allegro.cc/manual/ALLEGRO_BITMAP"><span class="a">ALLEGRO_BITMAP</span></a> <span class="k3">*</span>bitmap<span class="k2">)</span>
<a href="http://www.allegro.cc/manual/ALLEGRO_BITMAP"><span class="a">ALLEGRO_BITMAP</span></a> <span class="k3">*</span><a href="http://www.allegro.cc/manual/al_clone_bitmap"><span class="a">al_clone_bitmap</span></a><span class="k2">(</span><a href="http://www.allegro.cc/manual/ALLEGRO_BITMAP"><span class="a">ALLEGRO_BITMAP</span></a> <span class="k3">*</span>bitmap<span class="k2">)</span>
</pre></div></div><p>

Which is strange because my #of calls to al_destroy_bitmap == #calls to al_load_bitmap.
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (jmasterx)</author>
		<pubDate>Tue, 14 Feb 2012 01:42:27 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><p>Check your <span class="source-code"><a href="http://www.allegro.cc/manual/al_create_bitmap"><span class="a">al_create_bitmap</span></a></span> calls, etc, along with your fonts.</p><p>Maybe even update <span class="source-code"><a href="http://www.allegro.cc/manual/al_clone_bitmap"><span class="a">al_clone_bitmap</span></a><span class="k2">(</span><span class="k2">)</span></span> to log some info about the size of the bitmap, etc to help give a hint. (Or check the values in the debugger, if possible.)
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (Matthew Leverton)</author>
		<pubDate>Tue, 14 Feb 2012 01:53:04 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><p>Turns out I had not declared my Agui Image destructor virtual. Thanks for the help!
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (jmasterx)</author>
		<pubDate>Tue, 14 Feb 2012 02:27:34 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><p>The fact that its calling <span class="source-code">_al_convert_to_memory_bitmap</span> tells me that you weren&#39;t actually destroying the bitmaps before the display. It&#39;s something to look out for.</p><div class="quote_container"><div class="title"><a href="http://www.allegro.cc/forums/thread/609535/947267#target">jmasterx</a> said:</div><div class="quote"><p>Turns out I had not declared my Agui Image destructor virtual. Thanks for the help!</p></div></div><p>And that tells me I&#39;m correct! <img src="http://www.allegro.cc/forums/smileys/wink.gif" alt=";)" />
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (Thomas Fjellstrom)</author>
		<pubDate>Tue, 14 Feb 2012 03:14:27 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><p>The bitmap conversion changes were in the 5.1.0 release.
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (Peter Wang)</author>
		<pubDate>Tue, 14 Feb 2012 05:25:08 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><p>Oh well then. Shows what I know <img src="http://www.allegro.cc/forums/smileys/lipsrsealed.gif" alt=":-X" /></p><div class="quote_container"><div class="title"><a href="http://www.allegro.cc/forums/thread/609535/947289#target">Peter Wang</a> said:</div><div class="quote"><p>The bitmap conversion changes were in the 5.1.0 release.</p></div></div><p>The code wasn&#39;t tweaked at all in 5.1.1 over 5.1.0?
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (Thomas Fjellstrom)</author>
		<pubDate>Tue, 14 Feb 2012 11:31:58 +0000</pubDate>
	</item>
</rss>
