diff --git a/examples/destroy.html b/examples/destroy.html
new file mode 100644
index 00000000..55cbc982
--- /dev/null
+++ b/examples/destroy.html
@@ -0,0 +1,33 @@
+
+
Destroyable Emulator
+
+
+
+
+
diff --git a/src/browser/starter.js b/src/browser/starter.js
index f390cd6f..d6a3dd5f 100644
--- a/src/browser/starter.js
+++ b/src/browser/starter.js
@@ -459,7 +459,14 @@ V86Starter.prototype.stop = function()
*/
V86Starter.prototype.destroy = function()
{
- this.keyboard_adapter.destroy();
+ this.stop();
+
+ this.v86.destroy();
+ this.keyboard_adapter && this.keyboard_adapter.destroy();
+ this.network_adapter && this.network_adapter.destroy();
+ this.mouse_adapter && this.mouse_adapter.destroy();
+ this.screen_adapter && this.screen_adapter.destroy();
+ this.serial_adapter && this.serial_adapter.destroy();
};
/**