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.
22 lines
343 B
22 lines
343 B
/*
|
|
* Duktape 0.10.0 finalizes even reachable objects when a heap is
|
|
* destroyed, to give native code the chance to free resources
|
|
* reliably.
|
|
*/
|
|
|
|
/*---
|
|
{
|
|
"custom": true
|
|
}
|
|
---*/
|
|
|
|
/*===
|
|
finalizer executed
|
|
===*/
|
|
|
|
this.obj = {};
|
|
Duktape.fin(this.obj, function () {
|
|
print('finalizer executed');
|
|
});
|
|
|
|
// this.obj is reachable, finish
|
|
|