Subj : Narrowed the problem down to... To : netscape.public.mozilla.jseng From : "Sterling Bates" Date : Tue Nov 04 2003 01:33 pm ....this line: FJSObject := JS_DefineObject(FContext,JS_GetGlobalObject(FContext),FName,@bridge_class,ni l,0); Where: FContext is a running context (from another object), FName is a const char * == "bridge", bridge_class is properly defined (at least other working class definitions don't change things), etc. If I comment this line out, msvcr70.dll is happy. As soon as it's reintroduced, a breakpoint is fired when destroying the context. The class definition is this: bridge_class: JSClass = (name: 'CBridge'; flags: JSCLASS_HAS_PRIVATE; addProperty: Bridge_AddProperty; delProperty: Bridge_DeleteProperty; getProperty: Bridge_GetProperty; setProperty: Bridge_SetProperty; enumerate: JS_EnumerateStub; resolve: JS_ResolveStub; convert: JS_ConvertStub; finalize: Bridge_FinalizeOp); So far all of the custom hooks above have worked, so no problems there. In pseudo code, this is the main routine: engine = Engine.Create(); // init runtime & context try bridge = Bridge.Create(engine.Context,"bridge"); finally bridge.free(); end; engine.free(); The bridge constructor contains the line at the top of this message. The only thought I had concerning the freeing up of the JSObject is the ownership of |const char * name| for the object. Who is responsible for cleaning that up? (Note that I've even tried using a constant instead of variable for the name, and no difference. So I'm probably barking up the wrong tree.) Beyond that idea I have no idea what else could be causing it. Any help or direction is appreciated, Sterling .