Adding in proper copy_construct into function calls and destruct afterwards. Doesn't correctly destruct return values yet.
This commit is contained in:
@@ -47,7 +47,7 @@ fun print(toPrint: double) {
|
||||
var int_str = new<char>(how_much+2)
|
||||
snprintf(int_str, (how_much+1) cast ulong, "%f", toPrint)
|
||||
print(int_str)
|
||||
/*delete(int_str)*/
|
||||
delete(int_str)
|
||||
}
|
||||
fun print<T>(toPrint: T): void
|
||||
print(string::to_string(toPrint))
|
||||
|
||||
Reference in New Issue
Block a user