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.
17 lines
263 B
17 lines
263 B
|
|
/*===
|
|
finalizer, foo -> 123
|
|
===*/
|
|
|
|
a = { foo: 123 };
|
|
|
|
__duk__.setFinalizer(a, function (x) {
|
|
print('finalizer, foo ->', x.foo);
|
|
});
|
|
|
|
// refcount finalizing happens here
|
|
a = null;
|
|
|
|
// mark-and-sweep finalizing happens here if refcount disabled
|
|
__duk__.gc();
|
|
|
|
|