<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="http://forums.xna.com/utility/FeedStylesheets/rss.xsl" media="screen"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:wfw="http://wellformedweb.org/CommentAPI/"><channel><title>General</title><link>http://forums.xna.com/forums/32.aspx</link><description>Don't know where to post your question? Post it here!</description><dc:language>en</dc:language><generator>CommunityServer 2007.1 (Build: 0.0)</generator><item><title>Re: how to release the resources held by album instances (zune)?</title><link>http://forums.xna.com/forums/thread/65168.aspx</link><pubDate>Wed, 28 May 2008 19:58:58 GMT</pubDate><guid isPermaLink="false">4aa5dbf6-357b-46b2-b5b2-1b660a6dc370:65168</guid><dc:creator>sectionboy</dc:creator><slash:comments>0</slash:comments><comments>http://forums.xna.com/forums/thread/65168.aspx</comments><wfw:commentRss>http://forums.xna.com/forums/commentrss.aspx?SectionID=32&amp;PostID=65168</wfw:commentRss><description>It worked. Thank you.</description></item><item><title>Re: how to release the resources held by album instances (zune)?</title><link>http://forums.xna.com/forums/thread/65160.aspx</link><pubDate>Wed, 28 May 2008 19:40:16 GMT</pubDate><guid isPermaLink="false">4aa5dbf6-357b-46b2-b5b2-1b660a6dc370:65160</guid><dc:creator>Ziggy</dc:creator><slash:comments>0</slash:comments><comments>http://forums.xna.com/forums/thread/65160.aspx</comments><wfw:commentRss>http://forums.xna.com/forums/commentrss.aspx?SectionID=32&amp;PostID=65160</wfw:commentRss><description>You need to manually call Dispose on the textures returned from GetAlbumArt. Also some albums will not have textures associated with them and could throw an exception.</description></item><item><title>how to release the resources held by album instances (zune)?</title><link>http://forums.xna.com/forums/thread/65146.aspx</link><pubDate>Wed, 28 May 2008 19:08:17 GMT</pubDate><guid isPermaLink="false">4aa5dbf6-357b-46b2-b5b2-1b660a6dc370:65146</guid><dc:creator>sectionboy</dc:creator><slash:comments>0</slash:comments><comments>http://forums.xna.com/forums/thread/65146.aspx</comments><wfw:commentRss>http://forums.xna.com/forums/commentrss.aspx?SectionID=32&amp;PostID=65146</wfw:commentRss><description>&lt;p&gt;Hi, all,&lt;/p&gt;
&lt;p&gt;&amp;nbsp;I try to tile the display with album arts ( 36 albums) in zune, but after about 6 draw() iterations, the program gave me a outofmemory exception. I believe it&amp;#39;s because of the album instances held a lot of resources(?).&amp;nbsp;&amp;nbsp;When is&amp;nbsp;the album instance&amp;nbsp;deconstructed, after each foreach iteration or after the whole foreach statement?&amp;nbsp;Do I need to explicitly deconstruct it?&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; foreach (Album album in mediaLibrary.Albums)&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; {&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; spriteBatch.Draw(album.GetAlbumArt(Services), new Rectangle(&lt;em&gt; somewhere &lt;/em&gt;), Color.White);&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Quote from xna help:&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Album&lt;/strong&gt; resources such as art and thumbnails are cached in each &lt;b&gt;Album&lt;/b&gt; instance. Retrieving and maintaining references to multiple instances of the same album, and accessing art or thumbnails on each of those instances, creates multiple copies of the art or thumbnails. Because large numbers of album art textures can consume considerable memory, it is not advisable to hold a large number of &lt;b&gt;Album&lt;/b&gt; objects on which &lt;a&gt;GetAlbumArt&lt;/a&gt; has been called.&lt;/p&gt;</description></item></channel></rss>