On Fri, Jan 23, 2009 at 11:48 AM, Mike Belshe <[email protected]> wrote:

> The GC is non deterministic.
> I believe the Dispose will drop the weak reference for your object, but
> doesn't guarantee that the GC runs right away.
>
> In the debugging case, you could force a GC to verify this.  However,
> forcing GC in production code is not supported ....
>
> Do you need deterministic finalization?  If so, you'll need to do it on
> your own - this is a feature not supported by javascript.
>
> Mike
>
>
> On Fri, Jan 23, 2009 at 9:14 AM, vishnu <[email protected]> wrote:
>
>>
>>
>> Hi all,
>>
>> I am getting a leak while trying to use the V8 library with
>> context::new -This is the output of valgrind .seems like the node
>> allcoated neevr seems to get Destroyed and for each Context::new it
>> goes on accumaualtaing
>>
>> I am calling context.Dispose and context.clear .but stil the leak is
>> there.
>> And also calling
>>
>> GlobalHandles::Destroy(h1.location()); is causing a seg fault since
>> that node is still in use.
>>
>> can anyone please tell me how to get rid of this leak wihtout changing
>> much of the class memebers of classes Bootstrapper:: and Genesis
>>
>> ==9384== 35,984 bytes in 154 blocks are still reachable in loss record
>> 18 of 19
>> ==9384==    at 0x4005A88: malloc (vg_replace_malloc.c:207)
>> ==9384==    by 0x8265D53: v8::internal::Malloced::New(unsigned int)
>> (allocation.cc:37)
>> ==9384==    by 0x8142B94: v8::internal::Malloced::operator new
>> (unsigned int) (allocation.h:69)
>> ==9384==    by 0x815B1C4: v8::internal::GlobalHandles::Create
>> (v8::internal::Object*) (global-handles.cc:197)
>> ==9384==    by 0x8129C67: v8::internal::Genesis::CreateRoots
>> (v8::Handle<v8::ObjectTemplate>,
>> v8::internal::Handle<v8::internal::Object>) (bootstrapper.cc:463)
>> ==9384==    by 0x812ED77: v8::internal::Genesis::Genesis
>> (v8::internal::Handle<v8::internal::Object>,
>> v8::Handle<v8::ObjectTemplate>, v8::ExtensionConfiguration*)
>> (bootstrapper.cc:1454)
>> ==9384==    by 0x812EE69: v8::internal::Bootstrapper::CreateEnvironment
>> (v8::internal::Handle<v8::internal::Object>,
>> v8::Handle<v8::ObjectTemplate>, v8::ExtensionConfiguration*)
>> (bootstrapper.cc:346)
>> ==9384==    by 0x8112A97: v8::Context::New
>> (v8::ExtensionConfiguration*, v8::Handle<v8::ObjectTemplate>,
>> v8::Handle<v8::Value>) (api.cc:2265)
>> ==9384==    by 0x8106F9A: V8EcmaObject::V8EcmaObject(int, void**) (v8-
>> script.h:54)
>> ==9384==    by 0x8105718: __ccxml_initscript(ccxml_document_s*)
>> (v8if.c:58)
>> ==9384==    by 0x80F699E: _ccxml_initscript (ecmascript.c:64)
>> ==9384==    by 0x400E751: ???
>>
>>
>> Thanks a lot
>>
>> Vishnu
>>
>>
>

--~--~---------~--~----~------------~-------~--~----~
v8-dev mailing list
[email protected]
http://groups.google.com/group/v8-dev
-~----------~----~----~----~------~----~------~--~---

Reply via email to