Збирач сміття (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
| MainActivity.java: | |
| package site.sunmeat.helloworld; | |
| import android.app.Activity; | |
| import android.content.Intent; | |
| import android.os.Bundle; | |
| import android.util.Log; | |
| import android.widget.*; | |
| import androidx.activity.result.ActivityResultLauncher; |
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
| <?xml version="1.0" encoding="utf-8"?> | |
| <perfumes> | |
| <perfume> | |
| <name>Dior Sauvage</name> | |
| <brand>Dior</brand> | |
| <year>2015</year> | |
| <info>Аромат із цитрусово-деревними нотами, дуже крутий</info> | |
| </perfume> |
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
| WebController.java: | |
| package site.sunmeat.hibernate; | |
| import org.springframework.http.MediaType; | |
| import org.springframework.stereotype.Controller; | |
| import org.springframework.web.bind.annotation.*; | |
| import org.springframework.web.reactive.function.client.WebClient; | |
| import reactor.core.publisher.Mono; | |
| import java.util.*; |
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
| WebController.java: | |
| package site.sunmeat.hibernate; | |
| import org.springframework.http.MediaType; | |
| import org.springframework.stereotype.Controller; | |
| import org.springframework.web.bind.annotation.*; | |
| import org.springframework.web.reactive.function.client.WebClient; | |
| import reactor.core.publisher.Mono; | |
| import java.util.List; |
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
| HibernateApplication.java: | |
| package site.sunmeat.hibernate; | |
| import java.awt.Desktop; | |
| import java.net.URI; | |
| import org.springframework.boot.SpringApplication; | |
| import org.springframework.boot.autoconfigure.SpringBootApplication; | |
| import org.springframework.boot.context.event.ApplicationReadyEvent; | |
| import org.springframework.context.annotation.Bean; |
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
| ДЗ C# 6 "Генеретичні колекції" | |
| 1) List<T> – звичайний список: | |
| Тобто колекція, яку можна використовувати там де потрібен список, у звичайному порядку накшталт списку Student | |
| 2) HashSet<T> – список унікальних значеннь: | |
| Тобто колекція, яку можна використовувати там де потрібен список, в якому важливо, щоб не було повторів, тому що кожен об'єкт має унікальне значення | |
| накшталт список унікальних s.ID студентів | |
| 3)SortedSet<T> – унікальні + відсортовані: |
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
| build.gradle.kts (Module): | |
| dependencies { | |
| ... | |
| implementation("androidx.recyclerview:recyclerview:1.3.2") | |
| implementation("com.squareup.retrofit2:retrofit:3.0.0") | |
| implementation("com.squareup.retrofit2:converter-gson:3.0.0") | |
| implementation("com.google.code.gson:gson:2.11.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
| MainActivity.java: | |
| package site.sunmeat.helloworld; | |
| import android.os.Bundle; | |
| import android.widget.*; | |
| import androidx.appcompat.app.AppCompatActivity; | |
| import java.io.*; | |
| import java.net.*; | |
| import java.nio.charset.StandardCharsets; |
Твій котик Мурзик - страшенно голодний і дуже нетерплячий.
Кожні 5 секунд він кричить у логах «МЯЯЯЯУ!!!» і втрачає 1 життя з 9.
Якщо ти не нагодуєш його за 30 секунд - він помре з голоду, а додаток впаде з епічною написом:
«Мурзик пішов у котячу Вальгаллу»
- На головному екрані — кнопка «Нагодувати Мурзика» і
TextViewз кількістю життів + таймером.