| Index: include/AdblockPlus/V8ValueHolder.h |
| =================================================================== |
| --- a/include/AdblockPlus/V8ValueHolder.h |
| +++ b/include/AdblockPlus/V8ValueHolder.h |
| @@ -49,7 +49,14 @@ |
| { |
| reset(isolate, value); |
| } |
| - |
| + ~V8ValueHolder() |
| + { |
| + if (this->value.get()) |
| + { |
| + this->value->Dispose(this->isolate); |
| + this->value.reset(0); |
| + } |
|
Wladimir Palant
2013/10/08 08:12:19
Better avoid the code duplication here:
reset(0,
|
| + } |
| void reset(v8::Isolate* isolate, v8::Persistent<T> value) |
| { |
| if (this->value.get()) |