<?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[malloc, new koexistent?]]></title><description><![CDATA[<p>hi!</p>
<pre><code class="language-cpp">IRGENDEIN_TYP_EINS func_eins()
{
  irgendwas_eins = malloc ( ...
}

IRGENDEIN_TYP_ZWEI func_zwo()
{
  irgendwas_zwei = new ...
}

int main()
{
    free(irgendwas);
    delete irgendwas_zwei;
</code></pre>
<p>darf man das so in der art machen?<br />
mfg</p>
]]></description><link>https://www.c-plusplus.net/forum/topic/251035/malloc-new-koexistent</link><generator>RSS for Node</generator><lastBuildDate>Tue, 15 Sep 2026 17:58:32 GMT</lastBuildDate><atom:link href="https://www.c-plusplus.net/forum/topic/251035.rss" rel="self" type="application/rss+xml"/><pubDate>Mon, 28 Sep 2009 12:22:10 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to malloc, new koexistent? on Mon, 28 Sep 2009 12:22:10 GMT]]></title><description><![CDATA[<p>hi!</p>
<pre><code class="language-cpp">IRGENDEIN_TYP_EINS func_eins()
{
  irgendwas_eins = malloc ( ...
}

IRGENDEIN_TYP_ZWEI func_zwo()
{
  irgendwas_zwei = new ...
}

int main()
{
    free(irgendwas);
    delete irgendwas_zwei;
</code></pre>
<p>darf man das so in der art machen?<br />
mfg</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1785364</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1785364</guid><dc:creator><![CDATA[allocat0r]]></dc:creator><pubDate>Mon, 28 Sep 2009 12:22:10 GMT</pubDate></item><item><title><![CDATA[Reply to malloc, new koexistent? on Mon, 28 Sep 2009 12:29:56 GMT]]></title><description><![CDATA[<p>Das ist prinzipiell erlaubt, solange du nicht new mit free oder malloc mit delete verwendest.</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1785373</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1785373</guid><dc:creator><![CDATA[SeppJ]]></dc:creator><pubDate>Mon, 28 Sep 2009 12:29:56 GMT</pubDate></item><item><title><![CDATA[Reply to malloc, new koexistent? on Mon, 28 Sep 2009 12:37:57 GMT]]></title><description><![CDATA[<p>Stellt sich natürlich die Frage, ob das sinnvoll ist... meines Erachtens nicht.</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1785381</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1785381</guid><dc:creator><![CDATA[It0101]]></dc:creator><pubDate>Mon, 28 Sep 2009 12:37:57 GMT</pubDate></item><item><title><![CDATA[Reply to malloc, new koexistent? on Mon, 28 Sep 2009 12:55:24 GMT]]></title><description><![CDATA[<p>It0101 schrieb:</p>
<blockquote>
<p>Stellt sich natürlich die Frage, ob das sinnvoll ist... meines Erachtens nicht.</p>
</blockquote>
<p>Genau! Und deshalb auch gleich nochmal die Frage an den Threadersteller, warum er das will? New ist in C++ eigentlich immer vorzuziehen und was immer er vor hat, kann man sicherlich auf andere Weise besser machen.</p>
<p>edit: Und da ich schon ahne worauf das hinausläuft: Ich habe gerade mal ein Testprogramm geschrieben, dass 100 Millionen mal 5 chars anfordert. Es lief mit malloc und new EXAKT gleich schnell.</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1785383</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1785383</guid><dc:creator><![CDATA[SeppJ]]></dc:creator><pubDate>Mon, 28 Sep 2009 12:55:24 GMT</pubDate></item><item><title><![CDATA[Reply to malloc, new koexistent? on Mon, 28 Sep 2009 21:02:04 GMT]]></title><description><![CDATA[<p>SeppJ schrieb:</p>
<blockquote>
<p>edit: Und da ich schon ahne worauf das hinausläuft: Ich habe gerade mal ein Testprogramm geschrieben, dass 100 Millionen mal 5 chars anfordert. Es lief mit malloc und new EXAKT gleich schnell.</p>
</blockquote>
<p>Glaub' ich nicht <img
      src="https://www.c-plusplus.net/forum/plugins/nodebb-plugin-emoji/emoji/emoji-one/1f609.png?v=ab1pehoraso"
      class="not-responsive emoji emoji-emoji-one emoji--winking_face"
      title=";)"
      alt="😉"
    /></p>
<p>Stefan.</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1785643</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1785643</guid><dc:creator><![CDATA[DStefan]]></dc:creator><pubDate>Mon, 28 Sep 2009 21:02:04 GMT</pubDate></item><item><title><![CDATA[Reply to malloc, new koexistent? on Mon, 28 Sep 2009 21:07:27 GMT]]></title><description><![CDATA[<p>It0101 schrieb:</p>
<blockquote>
<p>Stellt sich natürlich die Frage, ob das sinnvoll ist... meines Erachtens nicht.</p>
</blockquote>
<p>Wenn man C-Code (z.B. alten) mit C++ mischt, wenn man z.B. eine C-Library in C++ verwendet.</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1785645</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1785645</guid><dc:creator><![CDATA[Bashar]]></dc:creator><pubDate>Mon, 28 Sep 2009 21:07:27 GMT</pubDate></item><item><title><![CDATA[Reply to malloc, new koexistent? on Mon, 28 Sep 2009 21:23:34 GMT]]></title><description><![CDATA[<p>DStefan schrieb:</p>
<blockquote>
<p>SeppJ schrieb:</p>
<blockquote>
<p>edit: Und da ich schon ahne worauf das hinausläuft: Ich habe gerade mal ein Testprogramm geschrieben, dass 100 Millionen mal 5 chars anfordert. Es lief mit malloc und new EXAKT gleich schnell.</p>
</blockquote>
<p>Glaub' ich nicht <img
      src="https://www.c-plusplus.net/forum/plugins/nodebb-plugin-emoji/emoji/emoji-one/1f609.png?v=ab1pehoraso"
      class="not-responsive emoji emoji-emoji-one emoji--winking_face"
      title=";)"
      alt="😉"
    /></p>
</blockquote>
<p>Hast mich erwischt. Innerhalb der Genauigkeitsgrenzen der Messung, was aber höchstens ein ziemlich kleiner Unterschied ist :p</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1785651</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1785651</guid><dc:creator><![CDATA[SeppJ]]></dc:creator><pubDate>Mon, 28 Sep 2009 21:23:34 GMT</pubDate></item><item><title><![CDATA[Reply to malloc, new koexistent? on Tue, 29 Sep 2009 07:05:48 GMT]]></title><description><![CDATA[<p>Bashar schrieb:</p>
<blockquote>
<p>It0101 schrieb:</p>
<blockquote>
<p>Stellt sich natürlich die Frage, ob das sinnvoll ist... meines Erachtens nicht.</p>
</blockquote>
<p>Wenn man C-Code (z.B. alten) mit C++ mischt, wenn man z.B. eine C-Library in C++ verwendet.</p>
</blockquote>
<p>Gut ok. In diesen Fällen geht es nicht anders. Aber im allgemeinen C++-Alltag ist das nicht nötig. Und wer scharf auf realloc ist, kann auch STL-Templates nutzen.</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1785718</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1785718</guid><dc:creator><![CDATA[It0101]]></dc:creator><pubDate>Tue, 29 Sep 2009 07:05:48 GMT</pubDate></item></channel></rss>