I spent some time tonight following up on my previous post about memory leaks I was encountering with V8. Stepping through in the debugger I was able to pin down a few problematic areas primarily dealing with some static variables holding on to memory. I went ahead and pushed them up to my fork of the V8 repo on github for anyone who is interested. With the changes I made I am no longer seeing any memory leaks with this very simple program:

int main(int argc, char* argv[])
{
    _CrtSetDbgFlag ( _CRTDBG_ALLOC_MEM_DF | _CRTDBG_LEAK_CHECK_DF );
    v8::V8::Initialize();
    v8::V8::Dispose();
    return 0;
}

Progress? Of course, if I remove either of those V8 calls then I see a bunch of memory leaks get spewed out again... So, that sucks. I am not sure how much more time I will spend on this though since tracking down leaks in V8 isn't exactly the focus of this project and this seems like a potentially deep rabbit hole. It does make it more painful separating out any memory leaks I am causing though.