Question 1:
Does a resource have to be destroyed after it is created? If so, in what ways can I destroy resources? In the code, I find several ways to destroy the resource and compile the code successfully:
(1)_ = move(x)
;
(2)move_to_sender
and so on ;
(3)Define the procedure of resource destruction as below:
public destroy_t(t: Self.T) {
let money: LibraCoin.T;
T{ money } = move(t);
LibraCoin.destroy_zero(move(money));
return;
}
Are there other ways to destroy resources?
Question 2:
I noticed that Libra has an administrator account. What privileges does that account have?
Question 3:
Is the way to release the borrow the same as the way to destroy the resource?
Question 4:
I noticed that some functions have a modifier native
. What does this modifier mean?
Question 5:
I notice that the function originally named borrow_global
has been renamed borrow_global_mut
. Does borrow_global still exist?