From 18571c17cfdf90bda3991ae771684d3aed5200f0 Mon Sep 17 00:00:00 2001 From: Charles Lowell Date: Thu, 8 Oct 2009 22:56:08 -0500 Subject: [PATCH] call persistent handle dispose when context goes away --- v8.cpp | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/v8.cpp b/v8.cpp index 09ef52a..394e9d6 100644 --- a/v8.cpp +++ b/v8.cpp @@ -4,8 +4,11 @@ typedef struct v8_context { v8_context() : context(v8::Context::New()) {} - //declare this as Local ??? - v8::Handle context; + ~v8_context() { + context.Dispose(); + printf("disposing of context\n"); + } + v8::Persistent context; } v8_context; extern "C" {