I've updated the code and no longer explicitly
calling obj.Dispose(isolateP), and my c++ object does get disposed when I
call LowMemoryNotification before terminating v8.  The extra Dispose was
clearing my near death callback.  This is good news and will greatly
simplify my design and assure all c++ objects that share a javascript
object are cleaned up.

> b.exe!beaker::console::Point::~Point()  Line 164 C++
  b.exe!beaker::console::Point::`scalar deleting destructor'()  + 0x2c bytes
C++
  b.exe!std::tr1::_Ref_count<beaker::console::Point>::_Destroy()  Line 1107
+ 0x34 bytes C++
  b.exe!std::tr1::_Ref_count_base::_Decref()  Line 1067 C++
  b.exe!std::tr1::_Ptr_base<beaker::console::Point>::_Decref()  Line 1291
C++
  
b.exe!std::tr1::shared_ptr<beaker::console::Point>::~shared_ptr<beaker::console::Point>()
 Line 1577 C++
  b.exe!std::tr1::shared_ptr<beaker::console::Point>::`scalar deleting
destructor'()  + 0x2c bytes C++
  
b.exe!beaker::console::detail::releaseSharedPtr<beaker::console::Point>(v8::Isolate
* isolate, v8::Persistent<v8::Value> persistentObj, void * pData)  Line 42
+ 0x2b bytes C++
  
b.exe!v8::internal::GlobalHandles::Node::PostGarbageCollectionProcessing(v8::internal::Isolate
* isolate, v8::internal::GlobalHandles * global_handles)  Line 288 C++
  
b.exe!v8::internal::GlobalHandles::PostGarbageCollectionProcessing(v8::internal::GarbageCollector
collector, v8::internal::GCTracer * tracer)  Line 667 + 0x25 bytes C++
  
b.exe!v8::internal::Heap::PerformGarbageCollection(v8::internal::GarbageCollector
collector, v8::internal::GCTracer * tracer)  Line 1003 + 0x27 bytes C++
  b.exe!v8::internal::Heap::CollectGarbage(v8::internal::AllocationSpace
space, v8::internal::GarbageCollector collector, const char * gc_reason,
const char * collector_reason)  Line 661 + 0x19 bytes C++
  b.exe!v8::internal::Heap::CollectAllAvailableGarbage(const char *
gc_reason)  Line 594 + 0x23 bytes C++
  b.exe!v8::V8::LowMemoryNotification()  Line 4968 C++



On Sun, May 26, 2013 at 11:38 PM, Sven Panne <[email protected]> wrote:

> On Sat, May 25, 2013 at 4:36 AM, Stephan Beal <[email protected]>wrote:
>
>>
>> On Fri, May 24, 2013 at 9:58 PM, Jim Acquavella <[email protected]>wrote:
>>
>>> Thanks Stephan!  I'm surprised and disappointed I can't guarentee my C++
>>> objects will be destroyed.  Can anyone from Google comment on this?  There
>>> must be a way to force everything allocated to be released at shutdown, no?!
>>>
>>
>> That horse has been beat to death here a few times already. No - there is
>> no guaranty that v8 will ever call your dtors and (AFAIR) no 100% reliable
>> way to force it to. To be safe, bind a destructor function to your native
>> types.
>>
>
> Correct, in a nutshell: Finalizers are a very bad idea, use destructors.
>
>    http://www.hpl.hp.com/techreports/2002/HPL-2002-335.pdf
>    http://www.hpl.hp.com/personal/Hans_Boehm/popl03/slides.pdf
>
>  --
> --
> v8-users mailing list
> [email protected]
> http://groups.google.com/group/v8-users
> ---
> You received this message because you are subscribed to a topic in the
> Google Groups "v8-users" group.
> To unsubscribe from this topic, visit
> https://groups.google.com/d/topic/v8-users/ta9wkdEY08o/unsubscribe?hl=en.
> To unsubscribe from this group and all its topics, send an email to
> [email protected].
> For more options, visit https://groups.google.com/groups/opt_out.
>
>
>

-- 
-- 
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/groups/opt_out.


Reply via email to