unowned string to_string() {
int x = 0;
return @"$x";
// error: Return value transfers ownership but method return type
// hasn't been declared to transfer ownership
}
不起作用。並且在沒有unowned
的情況下工作。(Vala)帶字符串模板的無人字符串返回類型
爲什麼?我看到:在瓦拉
文字字符串總是由程序模塊本身
資 - 在https://chebizarro.gitbooks.io/the-vala-tutorial/content/properties_ownership.html
相較於普通的字符串字面字符串模板是不是owned
由程序模塊?或者我誤解了某些東西?