This doesn't look WinCE/ARM related. Instead, you appear to never free the
persistent handle which then keeps the context alive indefinitely.

I propose to first learn about v8 basics in a less constrained environment,
and once you got that working, move on to porting your code to wince.

best
-jochen

On Tue, Sep 27, 2016 at 7:39 PM Avadhut Bhangui <[email protected]>
wrote:

> Hello,
>
> Currently i'm trying to build V8 engine on Win CE ARM. Can you please
> share the steps you followed.
>
> /Avadhut.
>
> On Wednesday, May 20, 2009 at 4:43:26 PM UTC+5:30, [email protected]
> wrote:
>
> Hi,
>
> I have modified the standard platform-win32.cc to build under CE (a
> few minor changes) and built an ARM v8 lib.
>
> When I link to this I can create a global ObjectTemplate, create a new
> Context from it and compile/run scripts fine provided I do this in the
> main application thread.
>
> If I create a thread via CreateThread() and run the same code I leak
> ~2.1mb for every thread I create. The thread appears to return
> correctly and the HandleScope destructor is entered.
>
> The code I'm using in the thread is:
>
>    {
>       Locker locker;
>       Locker::StartPreemption(100);
>
>       HandleScope handle_scope;
>       Persistent<Context> context = Context::New(NULL, script_global);
>       Context::Scope context_scope(context);
>
>       t = GETTICKSMS;
>
>       TryCatch try_catch;
>       Handle<Script> script = Script::Compile(String::New(thread-
> >code.c_str()));
>
>       rv = !script.IsEmpty();
>       if (!rv)
>          {
>          str.Format("JavaScript compilation error: %s",
> script_extracterror(&try_catch).c_str());
>          log_add("script_thread(): %s", str.c_str());
>          }
>       else
>          {
>          Handle<Value> result = script->Run();
>          rv = !result.IsEmpty();
>          if (!rv)
>             {
>             str.Format("JavaScript runtime error: %s",
> script_extracterror(&try_catch).c_str());
>             log_add("script_thread(): %s", str.c_str());
>             }
>          }
>       context.Dispose();
>       context.Clear();
>       }
>
> If I just leave the Locker and HandleScope the leak goes away.
>
> Any ideas?
>
> Thanks,
>
>
> Neil
>
> --
> --
> v8-users mailing list
> [email protected]
> http://groups.google.com/group/v8-users
> ---
> You received this message because you are subscribed to the Google Groups
> "v8-users" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to [email protected].
> For more options, visit https://groups.google.com/d/optout.
>

-- 
-- 
v8-users mailing list
[email protected]
http://groups.google.com/group/v8-users
--- 
You received this message because you are subscribed to the Google Groups 
"v8-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to