Get rid of fiber for finalizers.
Instead, finalizers just get access to the foreign object's raw bytes. This is deliberately limiting, since it discourages the user from interacting with the VM in the middle of a GC.
This commit is contained in:
@@ -0,0 +1,10 @@
|
||||
import "io" for File
|
||||
|
||||
// Don't store in a variable.
|
||||
File.open("test/io/file/finalize.wren")
|
||||
|
||||
System.gc()
|
||||
// We can't really test what the finalizer *does* from Wren, since the object
|
||||
// is unreachable, but this at least ensures it doesn't crash.
|
||||
|
||||
System.print("ok") // expect: ok
|
||||
Reference in New Issue
Block a user