diff --git a/rustbook-uz/src/ch15-03-drop.md b/rustbook-uz/src/ch15-03-drop.md index 05ab868..7bf7713 100644 --- a/rustbook-uz/src/ch15-03-drop.md +++ b/rustbook-uz/src/ch15-03-drop.md @@ -1,9 +1,6 @@ -## Running Code on Cleanup with the `Drop` Trait +## `Drop` Trait bilan tozalash uchun ishlaydigan kod -The second trait important to the smart pointer pattern is `Drop`, which lets -you customize what happens when a value is about to go out of scope. You can -provide an implementation for the `Drop` trait on any type, and that code can -be used to release resources like files or network connections. +Agar qiymat o‘z doirasidan chiqqanda uni o‘zgartirish imkonini beradigan ikkinchi muhim sanalgan smart pointer namunasidan biri bu `Drop`dir. Siz `Drop` traitini implementatsiya qilish uchun xohlagan turdan foydalanishingiz mumkin, va kodni fayl yoki tarmoqlarni ulash resurslarini yaratish uchun ham ishlatilishi mumkin We’re introducing `Drop` in the context of smart pointers because the functionality of the `Drop` trait is almost always used when implementing a