https://de.wikipedia.org/w/index.php?action=history&feed=atom&title=C%2B%2B%2FCLI C++/CLI - Versionsgeschichte 2025-05-02T17:04:05Z Versionsgeschichte dieser Seite in Wikipedia MediaWiki 1.44.0-wmf.27 https://de.wikipedia.org/w/index.php?title=C%2B%2B/CLI&diff=236252663&oldid=prev Siegbert v2: Artikel verlinkt / Code-Formatierung muss man nicht mit span-Tags & font-family formatieren; ein Leerzeichen am Anfang reicht; außerdem wird außenherum einheitlich Kasten gezeichnet / Quellen ergänzt und überarbeitet (einheitliche Vorlage, https, ggf. URL-Update) / Kleinigkeiten 2023-08-09T09:46:45Z <p>Artikel verlinkt / Code-Formatierung muss man nicht mit span-Tags &amp; font-family formatieren; ein Leerzeichen am Anfang reicht; außerdem wird außenherum einheitlich Kasten gezeichnet / Quellen ergänzt und überarbeitet (einheitliche Vorlage, https, ggf. URL-Update) / Kleinigkeiten</p> <a href="//de.wikipedia.org/w/index.php?title=C%2B%2B/CLI&amp;diff=236252663&amp;oldid=236090109">Änderungen zeigen</a> Siegbert v2 https://de.wikipedia.org/w/index.php?title=C%2B%2B/CLI&diff=236090109&oldid=prev 2A02:8070:A183:96A0:0:0:0:83F6: /* Sinn und Zweck der Erweiterungen */ 2023-08-03T20:33:57Z <p><span class="autocomment">Sinn und Zweck der Erweiterungen</span></p> <table style="background-color: #fff; color: #202122;" data-mw="interface"> <col class="diff-marker" /> <col class="diff-content" /> <col class="diff-marker" /> <col class="diff-content" /> <tr class="diff-title" lang="de"> <td colspan="2" style="background-color: #fff; color: #202122; text-align: center;">← Nächstältere Version</td> <td colspan="2" style="background-color: #fff; color: #202122; text-align: center;">Version vom 3. August 2023, 22:33 Uhr</td> </tr><tr> <td colspan="2" class="diff-lineno">Zeile 10:</td> <td colspan="2" class="diff-lineno">Zeile 10:</td> </tr> <tr> <td class="diff-marker"></td> <td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><br /></td> <td class="diff-marker"></td> <td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><br /></td> </tr> <tr> <td class="diff-marker"></td> <td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div>Ziele bei der Entwicklung von C++/CLI waren:</div></td> <td class="diff-marker"></td> <td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div>Ziele bei der Entwicklung von C++/CLI waren:</div></td> </tr> <tr> <td class="diff-marker" data-marker="−"></td> <td style="color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;"><div>* Schaffung einer eleganten Syntax, die gut zum bisherigen C++ passt. Wer bereits mit C++ vertraut ist soll die Spracherweiterungen als möglichst natürlich empfinden.</div></td> <td class="diff-marker" data-marker="+"></td> <td style="color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;"><div>* Schaffung einer eleganten Syntax, die gut zum bisherigen C++ passt. Wer bereits mit C++ vertraut ist<ins style="font-weight: bold; text-decoration: none;">,</ins> soll die Spracherweiterungen als möglichst natürlich empfinden.</div></td> </tr> <tr> <td class="diff-marker"></td> <td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div>* Komfortable Unterstützung von Besonderheiten der CLI wie [[Eigenschaft (Programmierung)|Eigenschaft]]en, [[Ereignis (Programmierung)|Ereignis]]se, [[generische Typen]], [[automatische Speicherbereinigung]], [[Referenz (Programmierung)|Referenz]]klassen usw.</div></td> <td class="diff-marker"></td> <td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div>* Komfortable Unterstützung von Besonderheiten der CLI wie [[Eigenschaft (Programmierung)|Eigenschaft]]en, [[Ereignis (Programmierung)|Ereignis]]se, [[generische Typen]], [[automatische Speicherbereinigung]], [[Referenz (Programmierung)|Referenz]]klassen usw.</div></td> </tr> <tr> <td class="diff-marker"></td> <td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div>* Gute Unterstützung von Sprachmitteln, die im bisherigen C++ verbreitet sind, wie etwa Templates oder deterministische Deinitialisierungen, und zwar für alle Typen, einschließlich der neuartigen CLI-Klassen.</div></td> <td class="diff-marker"></td> <td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div>* Gute Unterstützung von Sprachmitteln, die im bisherigen C++ verbreitet sind, wie etwa Templates oder deterministische Deinitialisierungen, und zwar für alle Typen, einschließlich der neuartigen CLI-Klassen.</div></td> </tr> </table> 2A02:8070:A183:96A0:0:0:0:83F6 https://de.wikipedia.org/w/index.php?title=C%2B%2B/CLI&diff=224953015&oldid=prev Wurgl: Änderung 224952977 von APPERbot rückgängig gemacht; 2022-07-31T07:51:37Z <p>Änderung <a href="/wiki/Spezial:Diff/224952977" title="Spezial:Diff/224952977">224952977</a> von <a href="/wiki/Spezial:Beitr%C3%A4ge/APPERbot" title="Spezial:Beiträge/APPERbot">APPERbot</a> rückgängig gemacht;</p> <table style="background-color: #fff; color: #202122;" data-mw="interface"> <col class="diff-marker" /> <col class="diff-content" /> <col class="diff-marker" /> <col class="diff-content" /> <tr class="diff-title" lang="de"> <td colspan="2" style="background-color: #fff; color: #202122; text-align: center;">← Nächstältere Version</td> <td colspan="2" style="background-color: #fff; color: #202122; text-align: center;">Version vom 31. Juli 2022, 09:51 Uhr</td> </tr><tr> <td colspan="2" class="diff-lineno">Zeile 39:</td> <td colspan="2" class="diff-lineno">Zeile 39:</td> </tr> <tr> <td class="diff-marker"></td> <td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div>|-----</div></td> <td class="diff-marker"></td> <td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div>|-----</div></td> </tr> <tr> <td class="diff-marker"></td> <td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div>| &lt;span style="font-family:monospace;"&gt;Object&lt;span style="color:#0000FF"&gt;*&lt;/span&gt; A &lt;span style="color:#0000FF"&gt;__gc[]&lt;/span&gt; = { &lt;span style="color:#0000FF"&gt;__box(&lt;/span&gt;41&lt;span style="color:#0000FF"&gt;)&lt;/span&gt;, &lt;span style="color:#0000FF"&gt;__box(&lt;/span&gt;42&lt;span style="color:#0000FF"&gt;)&lt;/span&gt; };&lt;/span&gt;</div></td> <td class="diff-marker"></td> <td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div>| &lt;span style="font-family:monospace;"&gt;Object&lt;span style="color:#0000FF"&gt;*&lt;/span&gt; A &lt;span style="color:#0000FF"&gt;__gc[]&lt;/span&gt; = { &lt;span style="color:#0000FF"&gt;__box(&lt;/span&gt;41&lt;span style="color:#0000FF"&gt;)&lt;/span&gt;, &lt;span style="color:#0000FF"&gt;__box(&lt;/span&gt;42&lt;span style="color:#0000FF"&gt;)&lt;/span&gt; };&lt;/span&gt;</div></td> </tr> <tr> <td class="diff-marker" data-marker="−"></td> <td style="color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;"><div>| &lt;span style="font-family:monospace;"&gt;&lt;span style="color:#0000FF"&gt;array&lt;/span&gt;Object&lt;span style="color:#0000FF"&gt;^&gt;^&lt;/span&gt; A = { 41, 42 };&lt;/span&gt;</div></td> <td class="diff-marker" data-marker="+"></td> <td style="color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;"><div>| &lt;span style="font-family:monospace;"&gt;&lt;span style="color:#0000FF"&gt;array<ins style="font-weight: bold; text-decoration: none;">&lt;</ins>&lt;/span&gt;Object&lt;span style="color:#0000FF"&gt;^&gt;^&lt;/span&gt; A = { 41, 42 };&lt;/span&gt;</div></td> </tr> <tr> <td class="diff-marker"></td> <td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div>|}</div></td> <td class="diff-marker"></td> <td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div>|}</div></td> </tr> <tr> <td class="diff-marker"></td> <td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div>1) Deklaration einer Funktion f, die eine CLI-Reihung (array) zurückgibt.</div></td> <td class="diff-marker"></td> <td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div>1) Deklaration einer Funktion f, die eine CLI-Reihung (array) zurückgibt.</div></td> </tr> </table> Wurgl https://de.wikipedia.org/w/index.php?title=C%2B%2B/CLI&diff=224952977&oldid=prev APPERbot: Bot: verdoppeltes < entfernt 2022-07-31T07:49:33Z <p>Bot: verdoppeltes &lt; entfernt</p> <table style="background-color: #fff; color: #202122;" data-mw="interface"> <col class="diff-marker" /> <col class="diff-content" /> <col class="diff-marker" /> <col class="diff-content" /> <tr class="diff-title" lang="de"> <td colspan="2" style="background-color: #fff; color: #202122; text-align: center;">← Nächstältere Version</td> <td colspan="2" style="background-color: #fff; color: #202122; text-align: center;">Version vom 31. Juli 2022, 09:49 Uhr</td> </tr><tr> <td colspan="2" class="diff-lineno">Zeile 39:</td> <td colspan="2" class="diff-lineno">Zeile 39:</td> </tr> <tr> <td class="diff-marker"></td> <td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div>|-----</div></td> <td class="diff-marker"></td> <td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div>|-----</div></td> </tr> <tr> <td class="diff-marker"></td> <td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div>| &lt;span style="font-family:monospace;"&gt;Object&lt;span style="color:#0000FF"&gt;*&lt;/span&gt; A &lt;span style="color:#0000FF"&gt;__gc[]&lt;/span&gt; = { &lt;span style="color:#0000FF"&gt;__box(&lt;/span&gt;41&lt;span style="color:#0000FF"&gt;)&lt;/span&gt;, &lt;span style="color:#0000FF"&gt;__box(&lt;/span&gt;42&lt;span style="color:#0000FF"&gt;)&lt;/span&gt; };&lt;/span&gt;</div></td> <td class="diff-marker"></td> <td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div>| &lt;span style="font-family:monospace;"&gt;Object&lt;span style="color:#0000FF"&gt;*&lt;/span&gt; A &lt;span style="color:#0000FF"&gt;__gc[]&lt;/span&gt; = { &lt;span style="color:#0000FF"&gt;__box(&lt;/span&gt;41&lt;span style="color:#0000FF"&gt;)&lt;/span&gt;, &lt;span style="color:#0000FF"&gt;__box(&lt;/span&gt;42&lt;span style="color:#0000FF"&gt;)&lt;/span&gt; };&lt;/span&gt;</div></td> </tr> <tr> <td class="diff-marker" data-marker="−"></td> <td style="color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;"><div>| &lt;span style="font-family:monospace;"&gt;&lt;span style="color:#0000FF"&gt;array<del style="font-weight: bold; text-decoration: none;">&lt;</del>&lt;/span&gt;Object&lt;span style="color:#0000FF"&gt;^&gt;^&lt;/span&gt; A = { 41, 42 };&lt;/span&gt;</div></td> <td class="diff-marker" data-marker="+"></td> <td style="color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;"><div>| &lt;span style="font-family:monospace;"&gt;&lt;span style="color:#0000FF"&gt;array&lt;/span&gt;Object&lt;span style="color:#0000FF"&gt;^&gt;^&lt;/span&gt; A = { 41, 42 };&lt;/span&gt;</div></td> </tr> <tr> <td class="diff-marker"></td> <td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div>|}</div></td> <td class="diff-marker"></td> <td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div>|}</div></td> </tr> <tr> <td class="diff-marker"></td> <td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div>1) Deklaration einer Funktion f, die eine CLI-Reihung (array) zurückgibt.</div></td> <td class="diff-marker"></td> <td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div>1) Deklaration einer Funktion f, die eine CLI-Reihung (array) zurückgibt.</div></td> </tr> </table> APPERbot https://de.wikipedia.org/w/index.php?title=C%2B%2B/CLI&diff=223308486&oldid=prev Filzstift: BKL-fix, replaced: [.NET| → AWB 2022-05-31T06:35:52Z <p>BKL-fix, replaced: [.NET| → <a href="/wiki/.Net-Framework" title=".Net-Framework"> mit [[Project:AWB|AWB</a></p> <table style="background-color: #fff; color: #202122;" data-mw="interface"> <col class="diff-marker" /> <col class="diff-content" /> <col class="diff-marker" /> <col class="diff-content" /> <tr class="diff-title" lang="de"> <td colspan="2" style="background-color: #fff; color: #202122; text-align: center;">← Nächstältere Version</td> <td colspan="2" style="background-color: #fff; color: #202122; text-align: center;">Version vom 31. Mai 2022, 08:35 Uhr</td> </tr><tr> <td colspan="2" class="diff-lineno">Zeile 1:</td> <td colspan="2" class="diff-lineno">Zeile 1:</td> </tr> <tr> <td class="diff-marker" data-marker="−"></td> <td style="color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;"><div>'''C++/CLI''' ist eine von [[Microsoft]] entwickelte Variante der Programmiersprache [[C++]], die den Zugriff auf die virtuelle Laufzeitumgebung <del style="font-weight: bold; text-decoration: none;">der</del> [[.<del style="font-weight: bold; text-decoration: none;">NET|.NET</del>-<del style="font-weight: bold; text-decoration: none;">Plattform</del>]] mit Hilfe von speziell darauf zugeschnittenen Spracherweiterungen ermöglicht.</div></td> <td class="diff-marker" data-marker="+"></td> <td style="color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;"><div>'''C++/CLI''' ist eine von [[Microsoft]] entwickelte Variante der Programmiersprache [[C++]], die den Zugriff auf die virtuelle Laufzeitumgebung <ins style="font-weight: bold; text-decoration: none;">des</ins> [[.<ins style="font-weight: bold; text-decoration: none;">Net</ins>-<ins style="font-weight: bold; text-decoration: none;">Framework</ins>]]<ins style="font-weight: bold; text-decoration: none;">s</ins> mit Hilfe von speziell darauf zugeschnittenen Spracherweiterungen ermöglicht.</div></td> </tr> <tr> <td class="diff-marker"></td> <td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><br /></td> <td class="diff-marker"></td> <td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><br /></td> </tr> <tr> <td class="diff-marker"></td> <td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div>C++/CLI erfüllt die ebenfalls von Microsoft entwickelte Spezifikation namens [[Common Language Infrastructure]] (CLI) zur Sprach- und Plattform-neutralen Entwicklung und Ausführung von .NET-Anwendungen. Programme, die in C++/CLI geschrieben sind, können vom Compiler in [[Common Intermediate Language|CIL]] übersetzt und auf der [[Virtuelle Maschine|virtuellen Maschine]] der .NET-Plattform betrieben werden.</div></td> <td class="diff-marker"></td> <td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div>C++/CLI erfüllt die ebenfalls von Microsoft entwickelte Spezifikation namens [[Common Language Infrastructure]] (CLI) zur Sprach- und Plattform-neutralen Entwicklung und Ausführung von .NET-Anwendungen. Programme, die in C++/CLI geschrieben sind, können vom Compiler in [[Common Intermediate Language|CIL]] übersetzt und auf der [[Virtuelle Maschine|virtuellen Maschine]] der .NET-Plattform betrieben werden.</div></td> </tr> <tr> <td colspan="2" class="diff-lineno">Zeile 65:</td> <td colspan="2" class="diff-lineno">Zeile 65:</td> </tr> <tr> <td class="diff-marker"></td> <td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><br /></td> <td class="diff-marker"></td> <td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><br /></td> </tr> <tr> <td class="diff-marker"></td> <td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div>=== Als automatische Variablen anlegbare CLI-Objekte ===</div></td> <td class="diff-marker"></td> <td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div>=== Als automatische Variablen anlegbare CLI-Objekte ===</div></td> </tr> <tr> <td class="diff-marker" data-marker="−"></td> <td style="color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;"><div>Eine weitere technische Neuerung und einer der wichtigsten Unterschiede zu anderen Sprachen mit automatischer Speicherbereinigung sind die als [[<del style="font-weight: bold; text-decoration: none;">Automatische</del> Variable<del style="font-weight: bold; text-decoration: none;">|automatische Variablen</del>]] (d.&amp;nbsp;h. auf dem Stack) anlegbaren CLI-Objekte. Die Lebensdauer von automatischen Variablen endet in dem Augenblick, in welchem sie ihren Gültigkeitsbereich verlassen.</div></td> <td class="diff-marker" data-marker="+"></td> <td style="color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;"><div>Eine weitere technische Neuerung und einer der wichtigsten Unterschiede zu anderen Sprachen mit automatischer Speicherbereinigung sind die als [[<ins style="font-weight: bold; text-decoration: none;">automatische</ins> Variable]]<ins style="font-weight: bold; text-decoration: none;">n</ins> (d.&amp;nbsp;h. auf dem Stack) anlegbaren CLI-Objekte. Die Lebensdauer von automatischen Variablen endet in dem Augenblick, in welchem sie ihren Gültigkeitsbereich verlassen.</div></td> </tr> <tr> <td class="diff-marker"></td> <td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><br /></td> <td class="diff-marker"></td> <td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><br /></td> </tr> <tr> <td class="diff-marker"></td> <td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div>Im Zusammenspiel mit den neuartigen Objektzeigern bleiben in C++ dadurch häufig angewandte Programmiertechniken wie [[Ressourcenbelegung ist Initialisierung|RAII]] (Abkürzung für engl. ''resource acquisition is initialization'') auch für die mit der automatischen Speicherbereinigung verwalteten CLI-Objekte möglich. Fehleranfällige Kodiertechniken, wie sie aus anderen Programmiersprachen bekannt sind, lassen sich damit vermeiden.</div></td> <td class="diff-marker"></td> <td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div>Im Zusammenspiel mit den neuartigen Objektzeigern bleiben in C++ dadurch häufig angewandte Programmiertechniken wie [[Ressourcenbelegung ist Initialisierung|RAII]] (Abkürzung für engl. ''resource acquisition is initialization'') auch für die mit der automatischen Speicherbereinigung verwalteten CLI-Objekte möglich. Fehleranfällige Kodiertechniken, wie sie aus anderen Programmiersprachen bekannt sind, lassen sich damit vermeiden.</div></td> </tr> </table> Filzstift https://de.wikipedia.org/w/index.php?title=C%2B%2B/CLI&diff=216939974&oldid=prev Aka: Dateigröße angepasst, Links normiert 2021-11-03T16:49:31Z <p>Dateigröße angepasst, Links normiert</p> <table style="background-color: #fff; color: #202122;" data-mw="interface"> <col class="diff-marker" /> <col class="diff-content" /> <col class="diff-marker" /> <col class="diff-content" /> <tr class="diff-title" lang="de"> <td colspan="2" style="background-color: #fff; color: #202122; text-align: center;">← Nächstältere Version</td> <td colspan="2" style="background-color: #fff; color: #202122; text-align: center;">Version vom 3. November 2021, 18:49 Uhr</td> </tr><tr> <td colspan="2" class="diff-lineno">Zeile 5:</td> <td colspan="2" class="diff-lineno">Zeile 5:</td> </tr> <tr> <td class="diff-marker"></td> <td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div>Seit Dezember 2005 liegt ein offiziell von der [[Ecma International|Ecma]] ratifizierter Standard für C++/CLI vor.</div></td> <td class="diff-marker"></td> <td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div>Seit Dezember 2005 liegt ein offiziell von der [[Ecma International|Ecma]] ratifizierter Standard für C++/CLI vor.</div></td> </tr> <tr> <td class="diff-marker"></td> <td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><br /></td> <td class="diff-marker"></td> <td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><br /></td> </tr> <tr> <td class="diff-marker" data-marker="−"></td> <td style="color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;"><div>[[Microsoft Visual Studio .NET|Microsoft Visual Studio]] ab Version 2005 und das Compiler-Frontend der [[Edison Design Group]] bieten eine Implementierung von C++/CLI an.&lt;ref&gt;[http://www.edg.com/docs/edg_cpp.pdf edg.com] (PDF) C++-Frontend der Edison Design Group (EDG)&lt;/ref&gt;</div></td> <td class="diff-marker" data-marker="+"></td> <td style="color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;"><div>[[Microsoft Visual Studio .NET|Microsoft Visual Studio]] ab Version 2005 und das Compiler-Frontend der [[Edison Design Group]] bieten eine Implementierung von C++/CLI an.&lt;ref&gt;[http://www.edg.com/docs/edg_cpp.pdf edg.com] (PDF<ins style="font-weight: bold; text-decoration: none;">; 518&amp;nbsp;kB</ins>) C++-Frontend der Edison Design Group (EDG)&lt;/ref&gt;</div></td> </tr> <tr> <td class="diff-marker"></td> <td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><br /></td> <td class="diff-marker"></td> <td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><br /></td> </tr> <tr> <td class="diff-marker"></td> <td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div>== Sinn und Zweck der Erweiterungen ==</div></td> <td class="diff-marker"></td> <td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div>== Sinn und Zweck der Erweiterungen ==</div></td> </tr> <tr> <td colspan="2" class="diff-lineno">Zeile 43:</td> <td colspan="2" class="diff-lineno">Zeile 43:</td> </tr> <tr> <td class="diff-marker"></td> <td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div>1) Deklaration einer Funktion f, die eine CLI-Reihung (array) zurückgibt.</div></td> <td class="diff-marker"></td> <td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div>1) Deklaration einer Funktion f, die eine CLI-Reihung (array) zurückgibt.</div></td> </tr> <tr> <td class="diff-marker"></td> <td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><br /></td> <td class="diff-marker"></td> <td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><br /></td> </tr> <tr> <td class="diff-marker" data-marker="−"></td> <td style="color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;"><div>Im Unterschied zu Managed C++ wird die [[Destruktor]]-Syntax &lt;code&gt;~T()&lt;/code&gt; nicht mehr auf den [[<del style="font-weight: bold; text-decoration: none;">Garbage_Collection</del>#Finalisierung|Finalisierer]] abgebildet. Destruktor und Finalisierer werden in C++/CLI unterschieden; der Finalisierer hat jetzt die Syntax &lt;code&gt;!T()&lt;/code&gt;. Der Destruktor ist außerdem identisch mit der Funktion &lt;code&gt;Dispose&lt;/code&gt; (dies wurde durch technische Änderungen an der [[Common Language Runtime|CLR]] ermöglicht).</div></td> <td class="diff-marker" data-marker="+"></td> <td style="color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;"><div>Im Unterschied zu Managed C++ wird die [[Destruktor]]-Syntax &lt;code&gt;~T()&lt;/code&gt; nicht mehr auf den [[<ins style="font-weight: bold; text-decoration: none;">Garbage Collection</ins>#Finalisierung|Finalisierer]] abgebildet. Destruktor und Finalisierer werden in C++/CLI unterschieden; der Finalisierer hat jetzt die Syntax &lt;code&gt;!T()&lt;/code&gt;. Der Destruktor ist außerdem identisch mit der Funktion &lt;code&gt;Dispose&lt;/code&gt; (dies wurde durch technische Änderungen an der [[Common Language Runtime|CLR]] ermöglicht).</div></td> </tr> <tr> <td class="diff-marker"></td> <td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><br /></td> <td class="diff-marker"></td> <td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><br /></td> </tr> <tr> <td class="diff-marker"></td> <td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div>== Weitere Neuerungen ==</div></td> <td class="diff-marker"></td> <td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div>== Weitere Neuerungen ==</div></td> </tr> </table> Aka https://de.wikipedia.org/w/index.php?title=C%2B%2B/CLI&diff=210756344&oldid=prev TaxonBot: Bot: Überarbeitung veralteter Syntax / HTML-Validierung 2021-04-09T20:38:14Z <p>Bot: Überarbeitung veralteter Syntax / <a href="/wiki/Hilfe:LINT" class="mw-redirect" title="Hilfe:LINT">HTML-Validierung</a></p> <table style="background-color: #fff; color: #202122;" data-mw="interface"> <col class="diff-marker" /> <col class="diff-content" /> <col class="diff-marker" /> <col class="diff-content" /> <tr class="diff-title" lang="de"> <td colspan="2" style="background-color: #fff; color: #202122; text-align: center;">← Nächstältere Version</td> <td colspan="2" style="background-color: #fff; color: #202122; text-align: center;">Version vom 9. April 2021, 22:38 Uhr</td> </tr><tr> <td colspan="2" class="diff-lineno">Zeile 27:</td> <td colspan="2" class="diff-lineno">Zeile 27:</td> </tr> <tr> <td class="diff-marker"></td> <td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div>! C++/CLI</div></td> <td class="diff-marker"></td> <td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div>! C++/CLI</div></td> </tr> <tr> <td class="diff-marker"></td> <td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div>|-----</div></td> <td class="diff-marker"></td> <td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div>|-----</div></td> </tr> <tr> <td class="diff-marker" data-marker="−"></td> <td style="color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;"><div>| &lt;<del style="font-weight: bold; text-decoration: none;">tt</del> style="color:#0000FF"&gt;__gc __interface&lt;/<del style="font-weight: bold; text-decoration: none;">tt</del>&gt;</div></td> <td class="diff-marker" data-marker="+"></td> <td style="color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;"><div>| &lt;<ins style="font-weight: bold; text-decoration: none;">span</ins> style="<ins style="font-weight: bold; text-decoration: none;">font-family:monospace;</ins>color:#0000FF"&gt;__gc __interface&lt;/<ins style="font-weight: bold; text-decoration: none;">span</ins>&gt;</div></td> </tr> <tr> <td class="diff-marker" data-marker="−"></td> <td style="color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;"><div>| &lt;<del style="font-weight: bold; text-decoration: none;">tt</del>&gt;&lt;span style="color:#0000FF"&gt;interface class&lt;/span&gt;&lt;/<del style="font-weight: bold; text-decoration: none;">tt</del>&gt;</div></td> <td class="diff-marker" data-marker="+"></td> <td style="color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;"><div>| &lt;<ins style="font-weight: bold; text-decoration: none;">span style="font-family:monospace;"</ins>&gt;&lt;span style="color:#0000FF"&gt;interface class&lt;/span&gt;&lt;/<ins style="font-weight: bold; text-decoration: none;">span</ins>&gt;</div></td> </tr> <tr> <td class="diff-marker"></td> <td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div>|-----</div></td> <td class="diff-marker"></td> <td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div>|-----</div></td> </tr> <tr> <td class="diff-marker" data-marker="−"></td> <td style="color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;"><div>|&lt;<del style="font-weight: bold; text-decoration: none;">tt</del>&gt;Console::WriteLine(&lt;span style="color:#0000FF"&gt;S&lt;/span&gt;"{0}", &lt;span style="color:#0000FF"&gt;__box(&lt;/span&gt;15&lt;span style="color:#0000FF"&gt;)&lt;/span&gt;);&lt;/<del style="font-weight: bold; text-decoration: none;">tt</del>&gt;</div></td> <td class="diff-marker" data-marker="+"></td> <td style="color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;"><div>|&lt;<ins style="font-weight: bold; text-decoration: none;">span style="font-family:monospace;"</ins>&gt;Console::WriteLine(&lt;span style="color:#0000FF"&gt;S&lt;/span&gt;"{0}", &lt;span style="color:#0000FF"&gt;__box(&lt;/span&gt;15&lt;span style="color:#0000FF"&gt;)&lt;/span&gt;);&lt;/<ins style="font-weight: bold; text-decoration: none;">span</ins>&gt;</div></td> </tr> <tr> <td class="diff-marker" data-marker="−"></td> <td style="color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;"><div>| &lt;<del style="font-weight: bold; text-decoration: none;">tt</del>&gt;Console::WriteLine("{0}", 15);&lt;/<del style="font-weight: bold; text-decoration: none;">tt</del>&gt;</div></td> <td class="diff-marker" data-marker="+"></td> <td style="color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;"><div>| &lt;<ins style="font-weight: bold; text-decoration: none;">span style="font-family:monospace;"</ins>&gt;Console::WriteLine("{0}", 15);&lt;/<ins style="font-weight: bold; text-decoration: none;">span</ins>&gt;</div></td> </tr> <tr> <td class="diff-marker"></td> <td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div>|----</div></td> <td class="diff-marker"></td> <td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div>|----</div></td> </tr> <tr> <td class="diff-marker"></td> <td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div>|align="center" colspan="2"|</div></td> <td class="diff-marker"></td> <td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div>|align="center" colspan="2"|</div></td> </tr> <tr> <td class="diff-marker"></td> <td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div>|-----</div></td> <td class="diff-marker"></td> <td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div>|-----</div></td> </tr> <tr> <td class="diff-marker" data-marker="−"></td> <td style="color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;"><div>| &lt;<del style="font-weight: bold; text-decoration: none;">tt</del>&gt;&lt;span style="color:#0000FF"&gt;int&lt;/span&gt; f()&lt;span style="color:#0000FF"&gt;__gc[]&lt;/span&gt;; // Deklaration&lt;/<del style="font-weight: bold; text-decoration: none;">tt</del>&gt;</div></td> <td class="diff-marker" data-marker="+"></td> <td style="color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;"><div>| &lt;<ins style="font-weight: bold; text-decoration: none;">span style="font-family:monospace;"</ins>&gt;&lt;span style="color:#0000FF"&gt;int&lt;/span&gt; f()&lt;span style="color:#0000FF"&gt;__gc[]&lt;/span&gt;; // Deklaration&lt;/<ins style="font-weight: bold; text-decoration: none;">span</ins>&gt;</div></td> </tr> <tr> <td class="diff-marker" data-marker="−"></td> <td style="color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;"><div>| &lt;<del style="font-weight: bold; text-decoration: none;">tt</del>&gt;&lt;span style="color:#0000FF"&gt;array&lt;int&gt;^&lt;/span&gt; f(); // Deklaration&lt;/<del style="font-weight: bold; text-decoration: none;">tt</del>&gt; &lt;sup&gt;1)&lt;/sup&gt;</div></td> <td class="diff-marker" data-marker="+"></td> <td style="color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;"><div>| &lt;<ins style="font-weight: bold; text-decoration: none;">span style="font-family:monospace;"</ins>&gt;&lt;span style="color:#0000FF"&gt;array&lt;int&gt;^&lt;/span&gt; f(); // Deklaration&lt;/<ins style="font-weight: bold; text-decoration: none;">span</ins>&gt; &lt;sup&gt;1)&lt;/sup&gt;</div></td> </tr> <tr> <td class="diff-marker"></td> <td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div>|-----</div></td> <td class="diff-marker"></td> <td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div>|-----</div></td> </tr> <tr> <td class="diff-marker" data-marker="−"></td> <td style="color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;"><div>| &lt;<del style="font-weight: bold; text-decoration: none;">tt</del>&gt;Object&lt;span style="color:#0000FF"&gt;*&lt;/span&gt; A &lt;span style="color:#0000FF"&gt;__gc[]&lt;/span&gt; = { &lt;span style="color:#0000FF"&gt;__box(&lt;/span&gt;41&lt;span style="color:#0000FF"&gt;)&lt;/span&gt;, &lt;span style="color:#0000FF"&gt;__box(&lt;/span&gt;42&lt;span style="color:#0000FF"&gt;)&lt;/span&gt; };&lt;/<del style="font-weight: bold; text-decoration: none;">tt</del>&gt;</div></td> <td class="diff-marker" data-marker="+"></td> <td style="color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;"><div>| &lt;<ins style="font-weight: bold; text-decoration: none;">span style="font-family:monospace;"</ins>&gt;Object&lt;span style="color:#0000FF"&gt;*&lt;/span&gt; A &lt;span style="color:#0000FF"&gt;__gc[]&lt;/span&gt; = { &lt;span style="color:#0000FF"&gt;__box(&lt;/span&gt;41&lt;span style="color:#0000FF"&gt;)&lt;/span&gt;, &lt;span style="color:#0000FF"&gt;__box(&lt;/span&gt;42&lt;span style="color:#0000FF"&gt;)&lt;/span&gt; };&lt;/<ins style="font-weight: bold; text-decoration: none;">span</ins>&gt;</div></td> </tr> <tr> <td class="diff-marker" data-marker="−"></td> <td style="color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;"><div>| &lt;<del style="font-weight: bold; text-decoration: none;">tt</del>&gt;&lt;span style="color:#0000FF"&gt;array&lt;&lt;/span&gt;Object&lt;span style="color:#0000FF"&gt;^&gt;^&lt;/span&gt; A = { 41, 42 };&lt;/<del style="font-weight: bold; text-decoration: none;">tt</del>&gt;</div></td> <td class="diff-marker" data-marker="+"></td> <td style="color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;"><div>| &lt;<ins style="font-weight: bold; text-decoration: none;">span style="font-family:monospace;"</ins>&gt;&lt;span style="color:#0000FF"&gt;array&lt;&lt;/span&gt;Object&lt;span style="color:#0000FF"&gt;^&gt;^&lt;/span&gt; A = { 41, 42 };&lt;/<ins style="font-weight: bold; text-decoration: none;">span</ins>&gt;</div></td> </tr> <tr> <td class="diff-marker"></td> <td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div>|}</div></td> <td class="diff-marker"></td> <td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div>|}</div></td> </tr> <tr> <td class="diff-marker"></td> <td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div>1) Deklaration einer Funktion f, die eine CLI-Reihung (array) zurückgibt.</div></td> <td class="diff-marker"></td> <td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div>1) Deklaration einer Funktion f, die eine CLI-Reihung (array) zurückgibt.</div></td> </tr> <tr> <td colspan="2" class="diff-lineno">Zeile 51:</td> <td colspan="2" class="diff-lineno">Zeile 51:</td> </tr> <tr> <td class="diff-marker"></td> <td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div>Die augenfälligste Neuerung ist die Syntax &lt;code&gt;^&lt;/code&gt; für Objektzeiger (manchmal auch ''Handles'' genannt). Beispiel:</div></td> <td class="diff-marker"></td> <td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div>Die augenfälligste Neuerung ist die Syntax &lt;code&gt;^&lt;/code&gt; für Objektzeiger (manchmal auch ''Handles'' genannt). Beispiel:</div></td> </tr> <tr> <td class="diff-marker"></td> <td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><br /></td> <td class="diff-marker"></td> <td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><br /></td> </tr> <tr> <td class="diff-marker" data-marker="−"></td> <td style="color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;"><div>:&lt;<del style="font-weight: bold; text-decoration: none;">tt</del>&gt;T&lt;span style="color:#0000FF"&gt;^&lt;/span&gt; whole_object_pointer = &lt;span style="color:#0000FF"&gt;gcnew&lt;/span&gt; T(a, b);&lt;/<del style="font-weight: bold; text-decoration: none;">tt</del>&gt;</div></td> <td class="diff-marker" data-marker="+"></td> <td style="color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;"><div>:&lt;<ins style="font-weight: bold; text-decoration: none;">span style="font-family:monospace;"</ins>&gt;T&lt;span style="color:#0000FF"&gt;^&lt;/span&gt; whole_object_pointer = &lt;span style="color:#0000FF"&gt;gcnew&lt;/span&gt; T(a, b);&lt;/<ins style="font-weight: bold; text-decoration: none;">span</ins>&gt;</div></td> </tr> <tr> <td class="diff-marker"></td> <td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><br /></td> <td class="diff-marker"></td> <td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><br /></td> </tr> <tr> <td class="diff-marker" data-marker="−"></td> <td style="color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;"><div>Dabei ist &lt;<del style="font-weight: bold; text-decoration: none;">tt</del>&gt;gcnew&lt;/<del style="font-weight: bold; text-decoration: none;">tt</del>&gt; ein Operator zur [[Allokation (Informatik)|Allokation]] von Objekten, die von der [[Automatische Speicherbereinigung|automatischen Speicherbereinigung]] verwaltet werden.</div></td> <td class="diff-marker" data-marker="+"></td> <td style="color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;"><div>Dabei ist &lt;<ins style="font-weight: bold; text-decoration: none;">span style="font-family:monospace;"</ins>&gt;gcnew&lt;/<ins style="font-weight: bold; text-decoration: none;">span</ins>&gt; ein Operator zur [[Allokation (Informatik)|Allokation]] von Objekten, die von der [[Automatische Speicherbereinigung|automatischen Speicherbereinigung]] verwaltet werden.</div></td> </tr> <tr> <td class="diff-marker"></td> <td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><br /></td> <td class="diff-marker"></td> <td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><br /></td> </tr> <tr> <td class="diff-marker"></td> <td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div>Im Vergleich dazu die herkömmliche Syntax für Zeiger:</div></td> <td class="diff-marker"></td> <td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div>Im Vergleich dazu die herkömmliche Syntax für Zeiger:</div></td> </tr> <tr> <td class="diff-marker"></td> <td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><br /></td> <td class="diff-marker"></td> <td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><br /></td> </tr> <tr> <td class="diff-marker" data-marker="−"></td> <td style="color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;"><div>:&lt;<del style="font-weight: bold; text-decoration: none;">tt</del>&gt;T&lt;span style="color:#0000FF"&gt;*&lt;/span&gt; plain_old_pointer = &lt;span style="color:#0000FF"&gt;new&lt;/span&gt; T(a, b);&lt;/<del style="font-weight: bold; text-decoration: none;">tt</del>&gt;</div></td> <td class="diff-marker" data-marker="+"></td> <td style="color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;"><div>:&lt;<ins style="font-weight: bold; text-decoration: none;">span style="font-family:monospace;"</ins>&gt;T&lt;span style="color:#0000FF"&gt;*&lt;/span&gt; plain_old_pointer = &lt;span style="color:#0000FF"&gt;new&lt;/span&gt; T(a, b);&lt;/<ins style="font-weight: bold; text-decoration: none;">span</ins>&gt;</div></td> </tr> <tr> <td class="diff-marker"></td> <td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><br /></td> <td class="diff-marker"></td> <td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><br /></td> </tr> <tr> <td class="diff-marker"></td> <td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div>=== Deinitialisierung und Speicherfreigabe ===</div></td> <td class="diff-marker"></td> <td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div>=== Deinitialisierung und Speicherfreigabe ===</div></td> </tr> </table> TaxonBot https://de.wikipedia.org/w/index.php?title=C%2B%2B/CLI&diff=200823095&oldid=prev MacOrcas: unerwünschte Formatierung entfernt (H:TG#nicht) 2020-06-10T11:42:05Z <p>unerwünschte Formatierung entfernt (<a href="/wiki/Hilfe:TG#nicht" class="mw-redirect" title="Hilfe:TG">H:TG#nicht</a>)</p> <table style="background-color: #fff; color: #202122;" data-mw="interface"> <col class="diff-marker" /> <col class="diff-content" /> <col class="diff-marker" /> <col class="diff-content" /> <tr class="diff-title" lang="de"> <td colspan="2" style="background-color: #fff; color: #202122; text-align: center;">← Nächstältere Version</td> <td colspan="2" style="background-color: #fff; color: #202122; text-align: center;">Version vom 10. Juni 2020, 13:42 Uhr</td> </tr><tr> <td colspan="2" class="diff-lineno">Zeile 41:</td> <td colspan="2" class="diff-lineno">Zeile 41:</td> </tr> <tr> <td class="diff-marker"></td> <td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div>| &lt;tt&gt;&lt;span style="color:#0000FF"&gt;array&lt;&lt;/span&gt;Object&lt;span style="color:#0000FF"&gt;^&gt;^&lt;/span&gt; A = { 41, 42 };&lt;/tt&gt;</div></td> <td class="diff-marker"></td> <td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div>| &lt;tt&gt;&lt;span style="color:#0000FF"&gt;array&lt;&lt;/span&gt;Object&lt;span style="color:#0000FF"&gt;^&gt;^&lt;/span&gt; A = { 41, 42 };&lt;/tt&gt;</div></td> </tr> <tr> <td class="diff-marker"></td> <td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div>|}</div></td> <td class="diff-marker"></td> <td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div>|}</div></td> </tr> <tr> <td colspan="2" class="diff-empty diff-side-deleted"></td> <td class="diff-marker"><a class="mw-diff-movedpara-right" title="Der Absatz wurde verschoben. Klicken, um zur alten Stelle zu springen." href="#movedpara_3_0_lhs">&#x26AB;</a></td> <td style="color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;"><div><a name="movedpara_1_0_rhs"></a>1) Deklaration einer Funktion f, die eine CLI-Reihung (array) zurückgibt.</div></td> </tr> <tr> <td class="diff-marker" data-marker="−"></td> <td style="color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;"><br /></td> <td colspan="2" class="diff-empty diff-side-added"></td> </tr> <tr> <td class="diff-marker"><a class="mw-diff-movedpara-left" title="Der Absatz wurde verschoben. Klicken, um zur neuen Stelle zu springen." href="#movedpara_1_0_rhs">&#x26AB;</a></td> <td style="color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;"><div><a name="movedpara_3_0_lhs"></a><del style="font-weight: bold; text-decoration: none;">&lt;small&gt;</del>1) Deklaration einer Funktion f, die eine CLI-Reihung (array) zurückgibt.<del style="font-weight: bold; text-decoration: none;">&lt;/small&gt;</del></div></td> <td colspan="2" class="diff-empty diff-side-added"></td> </tr> <tr> <td class="diff-marker"></td> <td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><br /></td> <td class="diff-marker"></td> <td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><br /></td> </tr> <tr> <td class="diff-marker"></td> <td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div>Im Unterschied zu Managed C++ wird die [[Destruktor]]-Syntax &lt;code&gt;~T()&lt;/code&gt; nicht mehr auf den [[Garbage_Collection#Finalisierung|Finalisierer]] abgebildet. Destruktor und Finalisierer werden in C++/CLI unterschieden; der Finalisierer hat jetzt die Syntax &lt;code&gt;!T()&lt;/code&gt;. Der Destruktor ist außerdem identisch mit der Funktion &lt;code&gt;Dispose&lt;/code&gt; (dies wurde durch technische Änderungen an der [[Common Language Runtime|CLR]] ermöglicht).</div></td> <td class="diff-marker"></td> <td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div>Im Unterschied zu Managed C++ wird die [[Destruktor]]-Syntax &lt;code&gt;~T()&lt;/code&gt; nicht mehr auf den [[Garbage_Collection#Finalisierung|Finalisierer]] abgebildet. Destruktor und Finalisierer werden in C++/CLI unterschieden; der Finalisierer hat jetzt die Syntax &lt;code&gt;!T()&lt;/code&gt;. Der Destruktor ist außerdem identisch mit der Funktion &lt;code&gt;Dispose&lt;/code&gt; (dies wurde durch technische Änderungen an der [[Common Language Runtime|CLR]] ermöglicht).</div></td> </tr> <tr> <td class="diff-marker"></td> <td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><br /></td> <td class="diff-marker"></td> <td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><br /></td> </tr> <tr> <td class="diff-marker"></td> <td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div>== Weitere Neuerungen ==</div></td> <td class="diff-marker"></td> <td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div>== Weitere Neuerungen ==</div></td> </tr> <tr> <td class="diff-marker" data-marker="−"></td> <td style="color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;"><br /></td> <td colspan="2" class="diff-empty diff-side-added"></td> </tr> <tr> <td class="diff-marker"></td> <td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div>Weitere Neuerungen gegenüber ISO-C++ sind: verbesserte Aufzählungsklassen (enum class), Delegaten, Verpacken (''boxing''), Schnittstellenklassen, versiegelte Klassen, Attribute usw.</div></td> <td class="diff-marker"></td> <td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div>Weitere Neuerungen gegenüber ISO-C++ sind: verbesserte Aufzählungsklassen (enum class), Delegaten, Verpacken (''boxing''), Schnittstellenklassen, versiegelte Klassen, Attribute usw.</div></td> </tr> <tr> <td class="diff-marker"></td> <td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><br /></td> <td class="diff-marker"></td> <td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><br /></td> </tr> <tr> <td class="diff-marker"></td> <td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div>== Objektzeiger ==</div></td> <td class="diff-marker"></td> <td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div>== Objektzeiger ==</div></td> </tr> <tr> <td class="diff-marker" data-marker="−"></td> <td style="color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;"><br /></td> <td colspan="2" class="diff-empty diff-side-added"></td> </tr> <tr> <td class="diff-marker"></td> <td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div>Die augenfälligste Neuerung ist die Syntax &lt;code&gt;^&lt;/code&gt; für Objektzeiger (manchmal auch ''Handles'' genannt). Beispiel:</div></td> <td class="diff-marker"></td> <td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div>Die augenfälligste Neuerung ist die Syntax &lt;code&gt;^&lt;/code&gt; für Objektzeiger (manchmal auch ''Handles'' genannt). Beispiel:</div></td> </tr> <tr> <td class="diff-marker"></td> <td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><br /></td> <td class="diff-marker"></td> <td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><br /></td> </tr> <tr> <td colspan="2" class="diff-lineno">Zeile 63:</td> <td colspan="2" class="diff-lineno">Zeile 60:</td> </tr> <tr> <td class="diff-marker"></td> <td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><br /></td> <td class="diff-marker"></td> <td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><br /></td> </tr> <tr> <td class="diff-marker"></td> <td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div>=== Deinitialisierung und Speicherfreigabe ===</div></td> <td class="diff-marker"></td> <td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div>=== Deinitialisierung und Speicherfreigabe ===</div></td> </tr> <tr> <td class="diff-marker" data-marker="−"></td> <td style="color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;"><br /></td> <td colspan="2" class="diff-empty diff-side-added"></td> </tr> <tr> <td class="diff-marker"></td> <td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div>Anders als bei gewöhnlichen Zeigern wird beim Löschen von Handles mittels &lt;code&gt;delete&lt;/code&gt; zwar der Destruktor aufgerufen, nicht aber der Speicher freigegeben. Stattdessen wird der vom Objekt belegte Speicher durch die automatische Speicherbereinigung an das System zurückgegeben.</div></td> <td class="diff-marker"></td> <td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div>Anders als bei gewöhnlichen Zeigern wird beim Löschen von Handles mittels &lt;code&gt;delete&lt;/code&gt; zwar der Destruktor aufgerufen, nicht aber der Speicher freigegeben. Stattdessen wird der vom Objekt belegte Speicher durch die automatische Speicherbereinigung an das System zurückgegeben.</div></td> </tr> <tr> <td class="diff-marker"></td> <td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><br /></td> <td class="diff-marker"></td> <td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><br /></td> </tr> <tr> <td colspan="2" class="diff-lineno">Zeile 69:</td> <td colspan="2" class="diff-lineno">Zeile 65:</td> </tr> <tr> <td class="diff-marker"></td> <td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><br /></td> <td class="diff-marker"></td> <td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><br /></td> </tr> <tr> <td class="diff-marker"></td> <td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div>=== Als automatische Variablen anlegbare CLI-Objekte ===</div></td> <td class="diff-marker"></td> <td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div>=== Als automatische Variablen anlegbare CLI-Objekte ===</div></td> </tr> <tr> <td class="diff-marker" data-marker="−"></td> <td style="color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;"><br /></td> <td colspan="2" class="diff-empty diff-side-added"></td> </tr> <tr> <td class="diff-marker"></td> <td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div>Eine weitere technische Neuerung und einer der wichtigsten Unterschiede zu anderen Sprachen mit automatischer Speicherbereinigung sind die als [[Automatische Variable|automatische Variablen]] (d.&amp;nbsp;h. auf dem Stack) anlegbaren CLI-Objekte. Die Lebensdauer von automatischen Variablen endet in dem Augenblick, in welchem sie ihren Gültigkeitsbereich verlassen.</div></td> <td class="diff-marker"></td> <td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div>Eine weitere technische Neuerung und einer der wichtigsten Unterschiede zu anderen Sprachen mit automatischer Speicherbereinigung sind die als [[Automatische Variable|automatische Variablen]] (d.&amp;nbsp;h. auf dem Stack) anlegbaren CLI-Objekte. Die Lebensdauer von automatischen Variablen endet in dem Augenblick, in welchem sie ihren Gültigkeitsbereich verlassen.</div></td> </tr> <tr> <td class="diff-marker"></td> <td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><br /></td> <td class="diff-marker"></td> <td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><br /></td> </tr> <tr> <td colspan="2" class="diff-lineno">Zeile 96:</td> <td colspan="2" class="diff-lineno">Zeile 91:</td> </tr> <tr> <td class="diff-marker"></td> <td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><br /></td> <td class="diff-marker"></td> <td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><br /></td> </tr> <tr> <td class="diff-marker"></td> <td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div>== Vergleich mit anderen .NET-Sprachen ==</div></td> <td class="diff-marker"></td> <td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div>== Vergleich mit anderen .NET-Sprachen ==</div></td> </tr> <tr> <td class="diff-marker" data-marker="−"></td> <td style="color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;"><br /></td> <td colspan="2" class="diff-empty diff-side-added"></td> </tr> <tr> <td class="diff-marker"></td> <td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div>Eine Besonderheit von C++/CLI ist die Mischbarkeit von Code, der auf der virtuellen Maschine läuft, und Code, der direkt auf der CPU ausgeführt wird. Beide Arten von Programmcode können in einer einzigen Programmdatei zusammengestellt werden. Mit dieser Möglichkeit nimmt C++/CLI bislang eine Sonderstellung unter den .NET-Sprachen ein.</div></td> <td class="diff-marker"></td> <td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div>Eine Besonderheit von C++/CLI ist die Mischbarkeit von Code, der auf der virtuellen Maschine läuft, und Code, der direkt auf der CPU ausgeführt wird. Beide Arten von Programmcode können in einer einzigen Programmdatei zusammengestellt werden. Mit dieser Möglichkeit nimmt C++/CLI bislang eine Sonderstellung unter den .NET-Sprachen ein.</div></td> </tr> <tr> <td class="diff-marker"></td> <td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><br /></td> <td class="diff-marker"></td> <td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><br /></td> </tr> </table> MacOrcas https://de.wikipedia.org/w/index.php?title=C%2B%2B/CLI&diff=192182812&oldid=prev Diaspomod: Kategorie CLR 2019-09-11T21:49:49Z <p>Kategorie CLR</p> <table style="background-color: #fff; color: #202122;" data-mw="interface"> <col class="diff-marker" /> <col class="diff-content" /> <col class="diff-marker" /> <col class="diff-content" /> <tr class="diff-title" lang="de"> <td colspan="2" style="background-color: #fff; color: #202122; text-align: center;">← Nächstältere Version</td> <td colspan="2" style="background-color: #fff; color: #202122; text-align: center;">Version vom 11. September 2019, 23:49 Uhr</td> </tr><tr> <td colspan="2" class="diff-lineno">Zeile 109:</td> <td colspan="2" class="diff-lineno">Zeile 109:</td> </tr> <tr> <td class="diff-marker"></td> <td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div>[[Kategorie:.NET]]</div></td> <td class="diff-marker"></td> <td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div>[[Kategorie:.NET]]</div></td> </tr> <tr> <td class="diff-marker"></td> <td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div>[[Kategorie:Virtuelle Maschine]]</div></td> <td class="diff-marker"></td> <td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div>[[Kategorie:Virtuelle Maschine]]</div></td> </tr> <tr> <td colspan="2" class="diff-empty diff-side-deleted"></td> <td class="diff-marker" data-marker="+"></td> <td style="color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;"><div>[[Kategorie:Programmiersprache für die Common Language Runtime]]</div></td> </tr> </table> Diaspomod https://de.wikipedia.org/w/index.php?title=C%2B%2B/CLI&diff=179274021&oldid=prev 77.187.51.208: /* Als automatische Variablen anlegbare CLI-Objekte */ Umformulierungen, darunter auch inhaltliche Änderungen. Zum Beispiel ist „unterlegen“ POV. 2018-07-19T09:45:20Z <p><span class="autocomment">Als automatische Variablen anlegbare CLI-Objekte: </span> Umformulierungen, darunter auch inhaltliche Änderungen. Zum Beispiel ist „unterlegen“ POV.</p> <table style="background-color: #fff; color: #202122;" data-mw="interface"> <col class="diff-marker" /> <col class="diff-content" /> <col class="diff-marker" /> <col class="diff-content" /> <tr class="diff-title" lang="de"> <td colspan="2" style="background-color: #fff; color: #202122; text-align: center;">← Nächstältere Version</td> <td colspan="2" style="background-color: #fff; color: #202122; text-align: center;">Version vom 19. Juli 2018, 11:45 Uhr</td> </tr><tr> <td colspan="2" class="diff-lineno">Zeile 87:</td> <td colspan="2" class="diff-lineno">Zeile 87:</td> </tr> <tr> <td class="diff-marker"></td> <td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div>}</div></td> <td class="diff-marker"></td> <td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div>}</div></td> </tr> <tr> <td class="diff-marker"></td> <td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div>&lt;/syntaxhighlight&gt;</div></td> <td class="diff-marker"></td> <td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div>&lt;/syntaxhighlight&gt;</div></td> </tr> <tr> <td class="diff-marker" data-marker="−"></td> <td style="color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;"><div>Beim Verlassen der Funktion &lt;code&gt;Uebertragung&lt;/code&gt; (mit &lt;code&gt;return&lt;/code&gt; oder beim Auftreten einer Ausnahme) rufen Objekte implizit ihre Funktion &lt;code&gt;Dispose&lt;/code&gt; auf, und zwar in <del style="font-weight: bold; text-decoration: none;">der umgekehrten</del> Reihenfolge <del style="font-weight: bold; text-decoration: none;">in</del> <del style="font-weight: bold; text-decoration: none;">der</del> <del style="font-weight: bold; text-decoration: none;">sie konstruiert wurden</del>. Im obigen Beispiel also &lt;code&gt;dest2&lt;/code&gt;, &lt;code&gt;dest1&lt;/code&gt; und <del style="font-weight: bold; text-decoration: none;">dann</del> &lt;code&gt;source&lt;/code&gt;.</div></td> <td class="diff-marker" data-marker="+"></td> <td style="color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;"><div>Beim Verlassen der Funktion &lt;code&gt;Uebertragung&lt;/code&gt; (mit &lt;code&gt;return&lt;/code&gt; oder beim Auftreten einer Ausnahme) rufen Objekte implizit ihre Funktion &lt;code&gt;Dispose&lt;/code&gt; auf, und zwar in <ins style="font-weight: bold; text-decoration: none;">umgekehrter</ins> Reihenfolge <ins style="font-weight: bold; text-decoration: none;">zu</ins> <ins style="font-weight: bold; text-decoration: none;">ihrer</ins> <ins style="font-weight: bold; text-decoration: none;">Konstruktion</ins>. Im obigen Beispiel also<ins style="font-weight: bold; text-decoration: none;"> wird zuerst der Destruktor von</ins> &lt;code&gt;dest2&lt;/code&gt;<ins style="font-weight: bold; text-decoration: none;"> aufgerufen</ins>,<ins style="font-weight: bold; text-decoration: none;"> dann der von</ins> &lt;code&gt;dest1&lt;/code&gt; und <ins style="font-weight: bold; text-decoration: none;">zuletzt der von</ins> &lt;code&gt;source&lt;/code&gt;<ins style="font-weight: bold; text-decoration: none;">, da diese Objekte in der Reihenfolge &lt;code&gt;source&lt;/code&gt;, &lt;code&gt;dest1&lt;/code&gt;, &lt;code&gt;dest2&lt;/code&gt; konstruiert wurden</ins>.</div></td> </tr> <tr> <td class="diff-marker"></td> <td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><br /></td> <td class="diff-marker"></td> <td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><br /></td> </tr> <tr> <td class="diff-marker"></td> <td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div>Wenn ein automatisches Objekt seinen Gültigkeitsbereich verlässt, oder beim Löschen mit &lt;code&gt;delete&lt;/code&gt; wird sein Destruktor aufgerufen. Der Compiler unterdrückt dann den Aufruf der normalerweise von der automatischen Speicherverwaltung angestoßenen [[Automatische Speicherbereinigung#Finalisierung|Finalisierungsfunktion]].</div></td> <td class="diff-marker"></td> <td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div>Wenn ein automatisches Objekt seinen Gültigkeitsbereich verlässt, oder beim Löschen mit &lt;code&gt;delete&lt;/code&gt; wird sein Destruktor aufgerufen. Der Compiler unterdrückt dann den Aufruf der normalerweise von der automatischen Speicherverwaltung angestoßenen [[Automatische Speicherbereinigung#Finalisierung|Finalisierungsfunktion]].</div></td> </tr> <tr> <td class="diff-marker"></td> <td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><br /></td> <td class="diff-marker"></td> <td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><br /></td> </tr> <tr> <td class="diff-marker" data-marker="−"></td> <td style="color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;"><div>Der Wegfall von Finalisierungsfunktionen kann sich insgesamt positiv auf die Ausführungsgeschwindigkeit auswirken, hilft aber noch andere Probleme zu vermeiden; zu Problemen bei Verwendung der Finalisierungsfunktion<del style="font-weight: bold; text-decoration: none;">:</del> siehe [[Automatische Speicherbereinigung#Finalisierung|Finalisierung]].</div></td> <td class="diff-marker" data-marker="+"></td> <td style="color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;"><div>Der Wegfall von Finalisierungsfunktionen kann sich insgesamt positiv auf die Ausführungsgeschwindigkeit auswirken, hilft aber noch andere Probleme zu vermeiden; zu Problemen bei Verwendung der Finalisierungsfunktion siehe [[Automatische Speicherbereinigung#Finalisierung|Finalisierung]].</div></td> </tr> <tr> <td class="diff-marker"></td> <td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><br /></td> <td class="diff-marker"></td> <td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><br /></td> </tr> <tr> <td class="diff-marker" data-marker="−"></td> <td style="color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;"><div>Im Unterschied zu C++/CLI muss beispielsweise in [[Java (Programmiersprache)|Java]] zur Ressourcenfreigabe eine <del style="font-weight: bold; text-decoration: none;">Dispose-</del>Funktion immer explizit aufgerufen werden. In <del style="font-weight: bold; text-decoration: none;">[[C-Sharp|</del>C#<del style="font-weight: bold; text-decoration: none;">]]</del> <del style="font-weight: bold; text-decoration: none;">gibt</del> <del style="font-weight: bold; text-decoration: none;">es</del> <del style="font-weight: bold; text-decoration: none;">so</del> <del style="font-weight: bold; text-decoration: none;">genannte</del> <del style="font-weight: bold; text-decoration: none;">Using</del>-Blöcke, <del style="font-weight: bold; text-decoration: none;">an</del> <del style="font-weight: bold; text-decoration: none;">deren</del> <del style="font-weight: bold; text-decoration: none;">Ende</del> <del style="font-weight: bold; text-decoration: none;">Deinitialisierungen vorgenommen werden</del>. <del style="font-weight: bold; text-decoration: none;">Die</del> <del style="font-weight: bold; text-decoration: none;">Using-</del>Blöcke <del style="font-weight: bold; text-decoration: none;">sind</del> <del style="font-weight: bold; text-decoration: none;">zwar</del> <del style="font-weight: bold; text-decoration: none;">eine</del> <del style="font-weight: bold; text-decoration: none;">Verbesserung</del> <del style="font-weight: bold; text-decoration: none;">gegenüber</del> <del style="font-weight: bold; text-decoration: none;">dem</del> Dispose-<del style="font-weight: bold; text-decoration: none;">Verfahren</del> <del style="font-weight: bold; text-decoration: none;">von</del> <del style="font-weight: bold; text-decoration: none;">Java</del>, müssen aber immer mitangegeben werden<del style="font-weight: bold; text-decoration: none;">,</del> <del style="font-weight: bold; text-decoration: none;">daher</del> sind <del style="font-weight: bold; text-decoration: none;">sie</del> <del style="font-weight: bold; text-decoration: none;">der</del> <del style="font-weight: bold; text-decoration: none;">deterministischen</del> Deinitialisierung von C++/CLI<del style="font-weight: bold; text-decoration: none;"> ebenfalls unterlegen</del>.</div></td> <td class="diff-marker" data-marker="+"></td> <td style="color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;"><div>Im Unterschied zu C++/CLI muss beispielsweise in [[Java (Programmiersprache)|Java<ins style="font-weight: bold; text-decoration: none;">]] oder [[C-Sharp|C#</ins>]] zur Ressourcenfreigabe eine <ins style="font-weight: bold; text-decoration: none;">entsprechende </ins>Funktion<ins style="font-weight: bold; text-decoration: none;"> (in C# &lt;code&gt;Dispose&lt;/code&gt;, in Java meist &lt;code&gt;close&lt;/code&gt;)</ins> immer explizit aufgerufen werden.<ins style="font-weight: bold; text-decoration: none;"> Beide Sprachen haben daher spezielle Syntaxkonstrukte entwickelt, mit denen solche Aufrufe sichergestellt werden sollen:</ins> In C# <ins style="font-weight: bold; text-decoration: none;">sind</ins> <ins style="font-weight: bold; text-decoration: none;">das</ins> <ins style="font-weight: bold; text-decoration: none;">die</ins> <ins style="font-weight: bold; text-decoration: none;">sogenannten</ins> <ins style="font-weight: bold; text-decoration: none;">''using</ins>-Blöcke<ins style="font-weight: bold; text-decoration: none;">''</ins>, <ins style="font-weight: bold; text-decoration: none;">in</ins> <ins style="font-weight: bold; text-decoration: none;">Java</ins> <ins style="font-weight: bold; text-decoration: none;">das</ins> <ins style="font-weight: bold; text-decoration: none;">''try-with-resources''-Konstrukt</ins>. <ins style="font-weight: bold; text-decoration: none;">Solche</ins> Blöcke <ins style="font-weight: bold; text-decoration: none;">nehmen</ins> <ins style="font-weight: bold; text-decoration: none;">dem</ins> <ins style="font-weight: bold; text-decoration: none;">Programmierer</ins> <ins style="font-weight: bold; text-decoration: none;">zwar</ins> <ins style="font-weight: bold; text-decoration: none;">die</ins> <ins style="font-weight: bold; text-decoration: none;">Sicherstellung von</ins> Dispose-<ins style="font-weight: bold; text-decoration: none;">Aufrufen</ins> <ins style="font-weight: bold; text-decoration: none;">beim</ins> <ins style="font-weight: bold; text-decoration: none;">Verlassen des Blocks ab</ins>, müssen aber immer mitangegeben werden <ins style="font-weight: bold; text-decoration: none;">und</ins> sind <ins style="font-weight: bold; text-decoration: none;">daher</ins> <ins style="font-weight: bold; text-decoration: none;">in</ins> <ins style="font-weight: bold; text-decoration: none;">dieser Hinsicht immer noch fehleranfälliger als die deterministische</ins> Deinitialisierung von C++/CLI.</div></td> </tr> <tr> <td class="diff-marker"></td> <td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><br /></td> <td class="diff-marker"></td> <td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><br /></td> </tr> <tr> <td class="diff-marker"></td> <td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div>== Vergleich mit anderen .NET-Sprachen ==</div></td> <td class="diff-marker"></td> <td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div>== Vergleich mit anderen .NET-Sprachen ==</div></td> </tr> </table> 77.187.51.208