]> granicus.if.org Git - gc/commit
Fix gc_cleanup destructor for non-heap objects (gc_cpp)
authorIvan Maidanski <ivmai@mail.ru>
Fri, 9 Dec 2016 23:19:32 +0000 (02:19 +0300)
committerIvan Maidanski <ivmai@mail.ru>
Mon, 6 Feb 2017 18:43:05 +0000 (21:43 +0300)
commit992e7cd7b85e225ef1e954dc847b078194ffd983
tree35aaf3da383f908c4ea68e40185800822b48edff
parent7f6b5deaad8fb34a9b9912824097a6165bb8332b
Fix gc_cleanup destructor for non-heap objects (gc_cpp)
(Cherry-pick commit ed19165 from 'release-7_6' branch.)

* include/gc_cpp.h (gc_cleanup::~gc_cleanup): If GC_base(this) returns
null (could be if the object is not allocated dynamically) then do not
call GC_register_finalizer_ignore_self.
include/gc_cpp.h