<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0"><channel><title><![CDATA[WNDCLASSEX: LoadCursor&#x2F;LoadIcon - Wo wird das freigegeben?]]></title><description><![CDATA[<p>Hi,</p>
<p>beim Befüllen der WNDCLASSEX Struktur findet man ja häufig folgenden Code:</p>
<pre><code class="language-cpp">wndclassex.hIcon = LoadIcon(NULL, IDI_APPLICATION);
wndclassex.hCursor = LoadCursor(NULL, IDC_ARROW);
</code></pre>
<p>Ich habe bis jetzt noch nie einen Source-Code gesehen wo diese Handles wieder freigegeben wurden. Werden diese automatisch freigegeben? Wenn ja, wo genau ist das dokumentiert? Habe nix gefunden. <img
      src="https://www.c-plusplus.net/forum/plugins/nodebb-plugin-emoji/emoji/emoji-one/1f921.png?v=ab1pehoraso"
      class="not-responsive emoji emoji-emoji-one emoji--clown_face"
      title=":clown:"
      alt="🤡"
    /></p>
]]></description><link>https://www.c-plusplus.net/forum/topic/87270/wndclassex-loadcursor-loadicon-wo-wird-das-freigegeben</link><generator>RSS for Node</generator><lastBuildDate>Sat, 18 Apr 2026 21:56:12 GMT</lastBuildDate><atom:link href="https://www.c-plusplus.net/forum/topic/87270.rss" rel="self" type="application/rss+xml"/><pubDate>Mon, 27 Sep 2004 21:29:39 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to WNDCLASSEX: LoadCursor&#x2F;LoadIcon - Wo wird das freigegeben? on Mon, 27 Sep 2004 21:29:39 GMT]]></title><description><![CDATA[<p>Hi,</p>
<p>beim Befüllen der WNDCLASSEX Struktur findet man ja häufig folgenden Code:</p>
<pre><code class="language-cpp">wndclassex.hIcon = LoadIcon(NULL, IDI_APPLICATION);
wndclassex.hCursor = LoadCursor(NULL, IDC_ARROW);
</code></pre>
<p>Ich habe bis jetzt noch nie einen Source-Code gesehen wo diese Handles wieder freigegeben wurden. Werden diese automatisch freigegeben? Wenn ja, wo genau ist das dokumentiert? Habe nix gefunden. <img
      src="https://www.c-plusplus.net/forum/plugins/nodebb-plugin-emoji/emoji/emoji-one/1f921.png?v=ab1pehoraso"
      class="not-responsive emoji emoji-emoji-one emoji--clown_face"
      title=":clown:"
      alt="🤡"
    /></p>
]]></description><link>https://www.c-plusplus.net/forum/post/616372</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/616372</guid><dc:creator><![CDATA[user_16]]></dc:creator><pubDate>Mon, 27 Sep 2004 21:29:39 GMT</pubDate></item><item><title><![CDATA[Reply to WNDCLASSEX: LoadCursor&#x2F;LoadIcon - Wo wird das freigegeben? on Mon, 27 Sep 2004 22:43:34 GMT]]></title><description><![CDATA[<p>Hmmmm,<br />
das ist ja mal ne Frage wo selbst ich husten muß!<br />
kann es sein das diese daten die Speicher belegen in einer Struct sitzen und somit freigegeben werden wenn die Struct nicht mehr Exestiert? Ich mein da ich ja nicht mit &quot;new&quot; was erstellt habe was ich mit delete wieder löschen muß.<br />
Ach oder macht das Windows wenn ich PostQuitMessage(0); sende und er die installierte Klasse löscht?</p>
<p>Oder steht die Lösung sogar in der MSDN?</p>
<p>Fragen über Fragen, ich bin Überfragt. <img
      src="https://www.c-plusplus.net/forum/plugins/nodebb-plugin-emoji/emoji/emoji-one/1f603.png?v=ab1pehoraso"
      class="not-responsive emoji emoji-emoji-one emoji--grinning_face_with_big_eyes"
      title=":D"
      alt="😃"
    /></p>
]]></description><link>https://www.c-plusplus.net/forum/post/616391</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/616391</guid><dc:creator><![CDATA[MiC++ha]]></dc:creator><pubDate>Mon, 27 Sep 2004 22:43:34 GMT</pubDate></item><item><title><![CDATA[Reply to WNDCLASSEX: LoadCursor&#x2F;LoadIcon - Wo wird das freigegeben? on Mon, 27 Sep 2004 22:50:20 GMT]]></title><description><![CDATA[<blockquote>
<p>It is only necessary to call DestroyIcon for icons and cursors created with the following functions: CreateIconFromResourceEx (if called without the LR_SHARED flag), CreateIconIndirect, and CopyIcon. Do not use this function to destroy a shared icon. A shared icon is valid as long as the module from which it was loaded remains in memory. The following functions obtain a shared icon.</p>
<p>LoadIcon<br />
LoadImage (if you use the LR_SHARED flag)<br />
CopyImage (if you use the LR_COPYRETURNORG flag and the hImage parameter is a shared icon)<br />
CreateIconFromResource<br />
CreateIconFromResourceEx (if you use the LR_SHARED flag)</p>
</blockquote>
<blockquote>
<p>The DestroyCursor function destroys a nonshared cursor. Do not use this function to destroy a shared cursor. A shared cursor is valid as long as the module from which it was loaded remains in memory. The following functions obtain a shared cursor:</p>
<p>LoadCursor<br />
LoadCursorFromFile<br />
LoadImage (if you use the LR_SHARED flag)<br />
CopyImage (if you use the LR_COPYRETURNORG flag and the hImage parameter is a shared cursor)</p>
</blockquote>
]]></description><link>https://www.c-plusplus.net/forum/post/616395</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/616395</guid><dc:creator><![CDATA[*hust*]]></dc:creator><pubDate>Mon, 27 Sep 2004 22:50:20 GMT</pubDate></item><item><title><![CDATA[Reply to WNDCLASSEX: LoadCursor&#x2F;LoadIcon - Wo wird das freigegeben? on Mon, 27 Sep 2004 23:00:04 GMT]]></title><description><![CDATA[<p>@*HUST*<br />
Und was sagt uns das, denn ich blick da nicht durch <img
      src="https://www.c-plusplus.net/forum/plugins/nodebb-plugin-emoji/emoji/emoji-one/1f61e.png?v=ab1pehoraso"
      class="not-responsive emoji emoji-emoji-one emoji--disappointed_face"
      title=":("
      alt="😞"
    /> zu viel English <img
      src="https://www.c-plusplus.net/forum/plugins/nodebb-plugin-emoji/emoji/emoji-one/1f615.png?v=ab1pehoraso"
      class="not-responsive emoji emoji-emoji-one emoji--confused_face"
      title=":confused:"
      alt="😕"
    /></p>
]]></description><link>https://www.c-plusplus.net/forum/post/616397</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/616397</guid><dc:creator><![CDATA[MiC++ha]]></dc:creator><pubDate>Mon, 27 Sep 2004 23:00:04 GMT</pubDate></item><item><title><![CDATA[Reply to WNDCLASSEX: LoadCursor&#x2F;LoadIcon - Wo wird das freigegeben? on Tue, 28 Sep 2004 12:31:09 GMT]]></title><description><![CDATA[<p>So nun aber mal Spass bei Seite, das ist ja schon ne gute Frage wenn sich jemand gedanken über die Speicherfreigaben macht.</p>
<p>LoadIcon() und LoadCursor() laden ehr indirekt, also ein shared Object das von Windows verwaltet wird da er den Cursor und so Zeichnet.<br />
Dieses Object bleibt so lange gültig bis die Anwendug beendet wird, oder ein anderer zur Laufzeit geladen wird. Somit übernimmt Windows diese Aufgabe und du brauchst dich darum nicht zu Kümmern.</p>
<p>Achso, das gild auch für LoadImage(), daher giebt man auch ein HBITMAP nicht wieder frei nach dem es mit LoadImage geladen wurde. EDIT: Natürlich muß das &quot; LR_SHARED&quot; Flag mit angegeben werden wie man oben in dem MSDN Ausschnitt sieht und unten liest, sorry hatte ich vergessen mit an zu geben.</p>
]]></description><link>https://www.c-plusplus.net/forum/post/616681</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/616681</guid><dc:creator><![CDATA[MiC++ha]]></dc:creator><pubDate>Tue, 28 Sep 2004 12:31:09 GMT</pubDate></item><item><title><![CDATA[Reply to WNDCLASSEX: LoadCursor&#x2F;LoadIcon - Wo wird das freigegeben? on Tue, 28 Sep 2004 11:19:16 GMT]]></title><description><![CDATA[<p>MiC++ha schrieb:</p>
<blockquote>
<p>Achso, das gild auch für LoadImage(), daher giebt man auch ein HBITMAP nicht wieder frei nach dem es mit LoadImage geladen wurde.</p>
</blockquote>
<p>*HUST*</p>
<p>Aber nur,</p>
<p>MSDN schrieb:</p>
<blockquote>
<p>if you use the LR_SHARED flag</p>
</blockquote>
<p><img
      src="https://www.c-plusplus.net/forum/plugins/nodebb-plugin-emoji/emoji/emoji-one/1f644.png?v=ab1pehoraso"
      class="not-responsive emoji emoji-emoji-one emoji--face_with_rolling_eyes"
      title=":rolling_eyes:"
      alt="🙄"
    /></p>
]]></description><link>https://www.c-plusplus.net/forum/post/616684</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/616684</guid><dc:creator><![CDATA[Hepi]]></dc:creator><pubDate>Tue, 28 Sep 2004 11:19:16 GMT</pubDate></item><item><title><![CDATA[Reply to WNDCLASSEX: LoadCursor&#x2F;LoadIcon - Wo wird das freigegeben? on Tue, 28 Sep 2004 11:44:59 GMT]]></title><description><![CDATA[<p>MiC++ha bitte ändere deinen Satz. Das sollen nicht alzu viele lesen. <img
      src="https://www.c-plusplus.net/forum/plugins/nodebb-plugin-emoji/emoji/emoji-one/1f644.png?v=ab1pehoraso"
      class="not-responsive emoji emoji-emoji-one emoji--face_with_rolling_eyes"
      title=":rolling_eyes:"
      alt="🙄"
    /></p>
]]></description><link>https://www.c-plusplus.net/forum/post/616699</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/616699</guid><dc:creator><![CDATA[ggggg]]></dc:creator><pubDate>Tue, 28 Sep 2004 11:44:59 GMT</pubDate></item></channel></rss>