Fix some easy leaks reported by asan.
git-svn-id: https://www.unprompted.com/svn/projects/tildefriends/trunk@3411 ed5197a5-7fde-0310-b194-c3ffbd925b24
This commit is contained in:
@ -98,6 +98,7 @@ Task::Task() {
|
||||
++_count;
|
||||
v8::Isolate::CreateParams options;
|
||||
options.array_buffer_allocator = v8::ArrayBuffer::Allocator::NewDefaultAllocator();
|
||||
_allocator = options.array_buffer_allocator;
|
||||
_isolate = v8::Isolate::New(options);
|
||||
_isolate->SetData(0, this);
|
||||
_isolate->SetCaptureStackTraceForUncaughtExceptions(true, 16);
|
||||
@ -117,6 +118,9 @@ Task::~Task() {
|
||||
_isolate->Dispose();
|
||||
_isolate = 0;
|
||||
|
||||
delete _allocator;
|
||||
_allocator = nullptr;
|
||||
|
||||
uv_loop_delete(_loop);
|
||||
--_count;
|
||||
}
|
||||
|
Reference in New Issue
Block a user