mirror of https://github.com/svaarala/duktape.git
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
23 lines
280 B
23 lines
280 B
/*---
|
|
{
|
|
"custom": true
|
|
}
|
|
---*/
|
|
|
|
/*===
|
|
finalizer
|
|
object
|
|
finalizer
|
|
object
|
|
===*/
|
|
|
|
a={};
|
|
|
|
// The finalizer rescues the reference (= makes it reachable again)
|
|
__duk__.setFinalizer(a, function(x) { print('finalizer'); a=x });
|
|
|
|
a = null;
|
|
print(typeof a);
|
|
a = null;
|
|
print(typeof a);
|
|
|
|
|