Destructor example

This commit is contained in:
2026-04-11 20:42:14 +10:00
parent 78f974e189
commit 4351821d30

View File

@@ -9,8 +9,14 @@ struct Person {
self.name = name self.name = name
self.age = age self.age = age
} }
destructor {
// We don't need to do anything here.
}
} }
max = Person("Max", 16) max = Person("Max", 16)
puts max puts max
puts max.greet() puts max.greet()