forked from solstice/solstice
Destructor example
This commit is contained in:
@@ -9,8 +9,14 @@ struct Person {
|
||||
self.name = name
|
||||
self.age = age
|
||||
}
|
||||
|
||||
destructor {
|
||||
// We don't need to do anything here.
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
max = Person("Max", 16)
|
||||
|
||||
puts max
|
||||
puts max.greet()
|
||||
Reference in New Issue
Block a user