Збирач сміття (Garbage Collector, GC) залишається фундаментальним елементом платформи .NET, забезпечуючи автоматичне керування пам'яттю та запобігаючи витокам. У версії .NET 10, випущеній у листопаді 2025 року як LTS-версія з трирічною підтримкою, GC зазнав суттєвих удосконалень, спрямованих на ще більшу адаптивність, зниження навантаження на heap та інтеграцію з сучасними апаратними можливостями. Ключовими інноваціями є розширений escape analysis для stack allocation, активація DATAS за замовчуванням для всіх режимів, гнучке налаштування регіонів пам'яті та оптимізації write barriers з підтримкою AVX10.2 та Arm64 SVE. Ця оглядова стаття аналізує ці зміни, їхні механізми, вплив на продуктивність та рекомендації щодо використання. На основі офіційної документації Microsoft та бенчмарків, демонструється зниження споживання пам'яті на 70–80% у контейнеризованих середовищах та зростання throughput н
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #include <iostream> | |
| using namespace std; | |
| void delete_element_at_the_end_of_array(int** ar, int* size) { | |
| int* temp = new int[*size - 1]; | |
| for (int i = 0; i < *size - 1; i++) | |
| temp[i] = (*ar)[i]; | |
| delete[] *ar; | |
| *ar = temp; | |
| --(*size); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #include <iostream> | |
| using namespace std; | |
| void obmin(int* a, int* b) { | |
| int c = *a; | |
| *a = *b; | |
| *b = c; | |
| } | |
| int main() { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #include <iostream> | |
| #include <windows.h> | |
| using namespace std; | |
| enum Color : short { | |
| BLACK, DARKBLUE, DARKGREEN, TURQUOISE, DARKRED, | |
| PURPLE, DARKYELLOW, GREY, DARKGREY, BLUE, GREEN, |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #include <iostream> | |
| using namespace std; | |
| //----------------------------------Задание 1---------------------------------- | |
| //Exercise 1 | |
| int main() | |
| { | |
| setlocale(0, ""); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #include <iostream> | |
| #include <algorithm> | |
| using namespace std; | |
| int main() | |
| { | |
| setlocale(0, ""); | |
| srand(time(0)); | |
| rand(); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #include <iostream> | |
| using namespace std; | |
| int main() | |
| { | |
| setlocale(0, ""); | |
| //----------------------------------Задание 1---------------------------------- | |
| cout << "#1\n"; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #include <iostream> | |
| using namespace std; | |
| int main() | |
| { | |
| setlocale(0, ""); | |
| // Задачі на if-else: | |
| //----------------------------------Задание 1---------------------------------- |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #include <iostream> | |
| #include <iomanip> | |
| using namespace std; | |
| int main() | |
| { | |
| setlocale(0, ""); | |
| //----------------------------------Задание 1---------------------------------- | |
| cout << "#1\n"; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #include <iostream> | |
| using namespace std; | |
| int main() | |
| { | |
| setlocale(0, ""); | |
| cout << "#1\n"; | |
| cout << "Перше число: "; |
NewerOlder